diff --git a/config/root-phase0/apiexport-cache.kcp.io.yaml b/config/root-phase0/apiexport-cache.kcp.io.yaml index a30844eda89..adcfa3ee03a 100644 --- a/config/root-phase0/apiexport-cache.kcp.io.yaml +++ b/config/root-phase0/apiexport-cache.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha2 kind: APIExport metadata: - creationTimestamp: null name: cache.kcp.io spec: resources: diff --git a/config/root-phase0/apiexport-shards.core.kcp.io.yaml b/config/root-phase0/apiexport-shards.core.kcp.io.yaml index 1da67ceccda..97e27daf4a0 100644 --- a/config/root-phase0/apiexport-shards.core.kcp.io.yaml +++ b/config/root-phase0/apiexport-shards.core.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha2 kind: APIExport metadata: - creationTimestamp: null name: shards.core.kcp.io spec: resources: diff --git a/config/root-phase0/apiexport-tenancy.kcp.io.yaml b/config/root-phase0/apiexport-tenancy.kcp.io.yaml index 7c54b938f44..08d54f694e1 100644 --- a/config/root-phase0/apiexport-tenancy.kcp.io.yaml +++ b/config/root-phase0/apiexport-tenancy.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha2 kind: APIExport metadata: - creationTimestamp: null name: tenancy.kcp.io spec: maximalPermissionPolicy: diff --git a/config/root-phase0/apiexport-topology.kcp.io.yaml b/config/root-phase0/apiexport-topology.kcp.io.yaml index 41a5ea2f531..0565c9c538b 100644 --- a/config/root-phase0/apiexport-topology.kcp.io.yaml +++ b/config/root-phase0/apiexport-topology.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha2 kind: APIExport metadata: - creationTimestamp: null name: topology.kcp.io spec: resources: diff --git a/config/root-phase0/apiresourceschema-cachedobjects.cache.kcp.io.yaml b/config/root-phase0/apiresourceschema-cachedobjects.cache.kcp.io.yaml index f34f93d79f0..2343df5af32 100644 --- a/config/root-phase0/apiresourceschema-cachedobjects.cache.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-cachedobjects.cache.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v250523-2b8c1d3c5.cachedobjects.cache.kcp.io spec: group: cache.kcp.io diff --git a/config/root-phase0/apiresourceschema-cachedresourceendpointslices.cache.kcp.io.yaml b/config/root-phase0/apiresourceschema-cachedresourceendpointslices.cache.kcp.io.yaml index d3b76b24e75..6292e300fb6 100644 --- a/config/root-phase0/apiresourceschema-cachedresourceendpointslices.cache.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-cachedresourceendpointslices.cache.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v251120-d8e87a979.cachedresourceendpointslices.cache.kcp.io spec: group: cache.kcp.io diff --git a/config/root-phase0/apiresourceschema-cachedresources.cache.kcp.io.yaml b/config/root-phase0/apiresourceschema-cachedresources.cache.kcp.io.yaml index cf059e6440a..46fbbdcdc00 100644 --- a/config/root-phase0/apiresourceschema-cachedresources.cache.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-cachedresources.cache.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v250920-de0c8484d.cachedresources.cache.kcp.io spec: group: cache.kcp.io diff --git a/config/root-phase0/apiresourceschema-logicalclusters.core.kcp.io.yaml b/config/root-phase0/apiresourceschema-logicalclusters.core.kcp.io.yaml index 06881ad2dda..a7233754bc9 100644 --- a/config/root-phase0/apiresourceschema-logicalclusters.core.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-logicalclusters.core.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v251016-6e24e0d49.logicalclusters.core.kcp.io spec: group: core.kcp.io diff --git a/config/root-phase0/apiresourceschema-partitions.topology.kcp.io.yaml b/config/root-phase0/apiresourceschema-partitions.topology.kcp.io.yaml index 38b42f4fd4e..c85edb966a7 100644 --- a/config/root-phase0/apiresourceschema-partitions.topology.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-partitions.topology.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v240903-d6797056a.partitions.topology.kcp.io spec: group: topology.kcp.io diff --git a/config/root-phase0/apiresourceschema-partitionsets.topology.kcp.io.yaml b/config/root-phase0/apiresourceschema-partitionsets.topology.kcp.io.yaml index c096312f70f..e9361300cfe 100644 --- a/config/root-phase0/apiresourceschema-partitionsets.topology.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-partitionsets.topology.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v240903-d6797056a.partitionsets.topology.kcp.io spec: group: topology.kcp.io diff --git a/config/root-phase0/apiresourceschema-shards.core.kcp.io.yaml b/config/root-phase0/apiresourceschema-shards.core.kcp.io.yaml index cba3c352511..4b20b1bb8fb 100644 --- a/config/root-phase0/apiresourceschema-shards.core.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-shards.core.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v240903-d6797056a.shards.core.kcp.io spec: group: core.kcp.io diff --git a/config/root-phase0/apiresourceschema-workspaceauthenticationconfigurations.tenancy.kcp.io.yaml b/config/root-phase0/apiresourceschema-workspaceauthenticationconfigurations.tenancy.kcp.io.yaml index 7878d6e6378..d91fb858c60 100644 --- a/config/root-phase0/apiresourceschema-workspaceauthenticationconfigurations.tenancy.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-workspaceauthenticationconfigurations.tenancy.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v250827-717cfea84.workspaceauthenticationconfigurations.tenancy.kcp.io spec: group: tenancy.kcp.io diff --git a/config/root-phase0/apiresourceschema-workspaces.tenancy.kcp.io.yaml b/config/root-phase0/apiresourceschema-workspaces.tenancy.kcp.io.yaml index 9cdb85e7de7..bb331530e49 100644 --- a/config/root-phase0/apiresourceschema-workspaces.tenancy.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-workspaces.tenancy.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v251015-1d163d0e5.workspaces.tenancy.kcp.io spec: group: tenancy.kcp.io diff --git a/config/root-phase0/apiresourceschema-workspacetypes.tenancy.kcp.io.yaml b/config/root-phase0/apiresourceschema-workspacetypes.tenancy.kcp.io.yaml index 97c843ffbf4..7622d956900 100644 --- a/config/root-phase0/apiresourceschema-workspacetypes.tenancy.kcp.io.yaml +++ b/config/root-phase0/apiresourceschema-workspacetypes.tenancy.kcp.io.yaml @@ -1,7 +1,6 @@ apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: v251015-1d163d0e5.workspacetypes.tenancy.kcp.io spec: group: tenancy.kcp.io diff --git a/docs/generators/cli-doc/go.mod b/docs/generators/cli-doc/go.mod index 7c5b95c77d4..b5e353a9f75 100644 --- a/docs/generators/cli-doc/go.mod +++ b/docs/generators/cli-doc/go.mod @@ -35,9 +35,9 @@ require ( github.com/charmbracelet/x/term v0.2.1 // indirect github.com/clipperhouse/uax29/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.1 // indirect + github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect @@ -45,7 +45,7 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect @@ -64,7 +64,7 @@ require ( github.com/mattn/go-runewidth v0.0.19 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect @@ -79,6 +79,8 @@ require ( github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/net v0.40.0 // indirect golang.org/x/oauth2 v0.29.0 // indirect golang.org/x/sync v0.14.0 // indirect @@ -90,19 +92,19 @@ require ( 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.33.5 // indirect - k8s.io/apiextensions-apiserver v0.33.3 // indirect - k8s.io/apimachinery v0.33.5 // indirect + k8s.io/api v0.34.2 // indirect + k8s.io/apiextensions-apiserver v0.34.2 // indirect + k8s.io/apimachinery v0.34.2 // indirect k8s.io/cli-runtime v0.33.3 // indirect - k8s.io/client-go v0.33.5 // indirect - k8s.io/component-base v0.33.3 // indirect + k8s.io/client-go v0.34.2 // indirect + k8s.io/component-base v0.34.2 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/kustomize/api v0.19.0 // indirect sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/docs/generators/cli-doc/go.sum b/docs/generators/cli-doc/go.sum index cc25df264df..3281555d777 100644 --- a/docs/generators/cli-doc/go.sum +++ b/docs/generators/cli-doc/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= -cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -35,12 +35,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= @@ -57,11 +57,10 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= -github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= 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= @@ -105,8 +104,9 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= @@ -168,12 +168,16 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= -go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= -go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= -go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.uber.org/goleak v1.3.1-0.20241121203838-4ff5fa6529ee h1:uOMbcH1Dmxv45VkkpZQYoerZFeDncWpjbN7ATiQOO7c= go.uber.org/goleak v1.3.1-0.20241121203838-4ff5fa6529ee/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -220,11 +224,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -237,24 +240,24 @@ 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.33.5 h1:YR+uhYj05jdRpcksv8kjSliW+v9hwXxn6Cv10aR8Juw= -k8s.io/api v0.33.5/go.mod h1:2gzShdwXKT5yPGiqrTrn/U/nLZ7ZyT4WuAj3XGDVgVs= -k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs= -k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8= -k8s.io/apimachinery v0.33.5 h1:NiT64hln4TQXeYR18/ES39OrNsjGz8NguxsBgp+6QIo= -k8s.io/apimachinery v0.33.5/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4= -k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo= +k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE= +k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI= k8s.io/cli-runtime v0.33.3 h1:Dgy4vPjNIu8LMJBSvs8W0LcdV0PX/8aGG1DA1W8lklA= k8s.io/cli-runtime v0.33.3/go.mod h1:yklhLklD4vLS8HNGgC9wGiuHWze4g7x6XQZ+8edsKEo= -k8s.io/client-go v0.33.5 h1:I8BdmQGxInpkMEnJvV6iG7dqzP3JRlpZZlib3OMFc3o= -k8s.io/client-go v0.33.5/go.mod h1:W8PQP4MxbM4ypgagVE65mUUqK1/ByQkSALF9tzuQ6u0= -k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA= -k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= +k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ= +k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM= 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-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= @@ -263,10 +266,9 @@ sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o= sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA= sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/go.mod b/go.mod index 1d4966ed069..621aaf5e7ae 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ go 1.24.0 require ( github.com/abiosoft/lineprefix v0.1.4 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc - github.com/emicklei/go-restful/v3 v3.12.1 + github.com/emicklei/go-restful/v3 v3.12.2 github.com/evanphx/json-patch v5.6.0+incompatible github.com/fatih/color v1.18.0 github.com/go-logr/logr v1.4.2 @@ -22,7 +22,7 @@ require ( github.com/kcp-dev/apimachinery/v2 v2.29.0-rc.1.0.20251112143648-9e5d2b714f33 github.com/kcp-dev/client-go v0.28.1-0.20251112153209-b37f4c1ff9a2 github.com/kcp-dev/code-generator/v3 v3.0.0-00010101000000-000000000000 - github.com/kcp-dev/embeddedetcd v1.0.3-0.20250805142358-a4839a83564a + github.com/kcp-dev/embeddedetcd v1.1.0 github.com/kcp-dev/logicalcluster/v3 v3.0.5 github.com/kcp-dev/sdk v0.0.0 github.com/martinlindhe/base36 v1.1.1 @@ -36,23 +36,23 @@ require ( go.uber.org/multierr v1.11.0 golang.org/x/sys v0.33.0 gopkg.in/square/go-jose.v2 v2.6.0 - k8s.io/api v0.33.5 - k8s.io/apiextensions-apiserver v0.33.3 - k8s.io/apimachinery v0.33.5 - k8s.io/apiserver v0.33.3 - k8s.io/client-go v0.33.5 - k8s.io/code-generator v0.33.3 - k8s.io/component-base v0.33.3 + k8s.io/api v0.34.2 + k8s.io/apiextensions-apiserver v0.34.2 + k8s.io/apimachinery v0.34.2 + k8s.io/apiserver v0.34.2 + k8s.io/client-go v0.34.2 + k8s.io/code-generator v0.34.2 + k8s.io/component-base v0.34.2 k8s.io/klog/v2 v2.130.1 - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff - k8s.io/kubernetes v1.33.3 + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b + k8s.io/kubernetes v1.34.2 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 - sigs.k8s.io/yaml v1.4.0 + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 + sigs.k8s.io/yaml v1.6.0 ) require ( - cel.dev/expr v0.19.1 // indirect + cel.dev/expr v0.24.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect @@ -68,8 +68,8 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/egymgmbh/go-prefix-writer v0.0.0-20180609083313-7326ea162eca // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-jose/go-jose/v3 v3.0.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect @@ -77,18 +77,17 @@ require ( github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/cel-go v0.23.2 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/cel-go v0.26.0 // indirect + github.com/google/gnostic-models v0.7.0 // indirect github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect - github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jonboulle/clockwork v0.4.0 // indirect + github.com/jonboulle/clockwork v0.5.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kylelemons/godebug v1.1.0 // indirect @@ -100,7 +99,7 @@ require ( github.com/moby/sys/mountinfo v0.7.2 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/onsi/gomega v1.35.1 // indirect @@ -120,25 +119,26 @@ require ( github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 // indirect - go.etcd.io/bbolt v1.3.11 // indirect - go.etcd.io/etcd/api/v3 v3.5.21 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.21 // indirect - go.etcd.io/etcd/client/v2 v2.305.21 // indirect - go.etcd.io/etcd/client/v3 v3.5.21 // indirect - go.etcd.io/etcd/pkg/v3 v3.5.21 // indirect - go.etcd.io/etcd/raft/v3 v3.5.21 // indirect - go.etcd.io/etcd/server/v3 v3.5.21 // indirect + go.etcd.io/bbolt v1.4.2 // indirect + go.etcd.io/etcd/api/v3 v3.6.4 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.6.4 // indirect + go.etcd.io/etcd/client/v3 v3.6.4 // indirect + go.etcd.io/etcd/pkg/v3 v3.6.4 // indirect + go.etcd.io/etcd/server/v3 v3.6.4 // indirect + go.etcd.io/raft/v3 v3.6.0 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect - go.opentelemetry.io/otel v1.33.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect - go.opentelemetry.io/otel/metric v1.33.0 // indirect - go.opentelemetry.io/otel/sdk v1.33.0 // indirect - go.opentelemetry.io/otel/trace v1.33.0 // indirect - go.opentelemetry.io/proto/otlp v1.4.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.opentelemetry.io/proto/otlp v1.5.0 // indirect go.uber.org/zap v1.27.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.38.0 // indirect golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect golang.org/x/mod v0.24.0 // indirect @@ -149,10 +149,9 @@ require ( golang.org/x/text v0.25.0 // indirect golang.org/x/time v0.11.0 // indirect golang.org/x/tools v0.33.0 // indirect - google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/grpc v1.69.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect + google.golang.org/grpc v1.72.1 // indirect google.golang.org/protobuf v1.36.5 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect @@ -167,8 +166,8 @@ require ( k8s.io/dynamic-resource-allocation v0.0.0 // indirect k8s.io/endpointslice v0.0.0 // indirect k8s.io/externaljwt v0.0.0 // indirect - k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4 // indirect - k8s.io/kms v0.33.3 // indirect + k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect + k8s.io/kms v0.34.2 // indirect k8s.io/kube-aggregator v0.0.0 // indirect k8s.io/kube-controller-manager v0.0.0 // indirect k8s.io/kubelet v0.0.0 // indirect @@ -180,38 +179,38 @@ require ( ) replace ( - k8s.io/api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20251113163256-f038ec6bf609 - k8s.io/apiextensions-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20251113163256-f038ec6bf609 - k8s.io/apimachinery => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20251113163256-f038ec6bf609 - k8s.io/apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20251113163256-f038ec6bf609 - k8s.io/cli-runtime => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20251113163256-f038ec6bf609 - k8s.io/client-go => github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20251113163256-f038ec6bf609 - k8s.io/cloud-provider => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20251113163256-f038ec6bf609 - k8s.io/cluster-bootstrap => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20251113163256-f038ec6bf609 - k8s.io/code-generator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20251113163256-f038ec6bf609 - k8s.io/component-base => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20251113163256-f038ec6bf609 - k8s.io/component-helpers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20251113163256-f038ec6bf609 - k8s.io/controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20251113163256-f038ec6bf609 - k8s.io/cri-api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20251113163256-f038ec6bf609 - k8s.io/cri-client => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-client v0.0.0-20251113163256-f038ec6bf609 - k8s.io/csi-translation-lib => github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20251113163256-f038ec6bf609 - k8s.io/dynamic-resource-allocation => github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20251113163256-f038ec6bf609 - k8s.io/endpointslice => github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20251113163256-f038ec6bf609 - k8s.io/externaljwt => github.com/kcp-dev/kubernetes/staging/src/k8s.io/externaljwt v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kms => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kube-aggregator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kube-controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kube-proxy => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kube-scheduler => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kubectl => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kubelet => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20251113163256-f038ec6bf609 - k8s.io/kubernetes => github.com/kcp-dev/kubernetes v0.0.0-20251113163256-f038ec6bf609 - k8s.io/metrics => github.com/kcp-dev/kubernetes/staging/src/k8s.io/metrics v0.0.0-20251113163256-f038ec6bf609 - k8s.io/mount-utils => github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20251113163256-f038ec6bf609 - k8s.io/pod-security-admission => github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251113163256-f038ec6bf609 - k8s.io/sample-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20251113163256-f038ec6bf609 - k8s.io/sample-cli-plugin => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20251113163256-f038ec6bf609 - k8s.io/sample-controller => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20251113163256-f038ec6bf609 + k8s.io/api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20251209073509-71e0f2506325 + k8s.io/apiextensions-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20251209073509-71e0f2506325 + k8s.io/apimachinery => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20251209073509-71e0f2506325 + k8s.io/apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20251209073509-71e0f2506325 + k8s.io/cli-runtime => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cli-runtime v0.0.0-20251209073509-71e0f2506325 + k8s.io/client-go => github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20251209073509-71e0f2506325 + k8s.io/cloud-provider => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20251209073509-71e0f2506325 + k8s.io/cluster-bootstrap => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20251209073509-71e0f2506325 + k8s.io/code-generator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20251209073509-71e0f2506325 + k8s.io/component-base => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20251209073509-71e0f2506325 + k8s.io/component-helpers => github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20251209073509-71e0f2506325 + k8s.io/controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20251209073509-71e0f2506325 + k8s.io/cri-api => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20251209073509-71e0f2506325 + k8s.io/cri-client => github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-client v0.0.0-20251209073509-71e0f2506325 + k8s.io/csi-translation-lib => github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20251209073509-71e0f2506325 + k8s.io/dynamic-resource-allocation => github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20251209073509-71e0f2506325 + k8s.io/endpointslice => github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20251209073509-71e0f2506325 + k8s.io/externaljwt => github.com/kcp-dev/kubernetes/staging/src/k8s.io/externaljwt v0.0.0-20251209073509-71e0f2506325 + k8s.io/kms => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20251209073509-71e0f2506325 + k8s.io/kube-aggregator => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20251209073509-71e0f2506325 + k8s.io/kube-controller-manager => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20251209073509-71e0f2506325 + k8s.io/kube-proxy => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-proxy v0.0.0-20251209073509-71e0f2506325 + k8s.io/kube-scheduler => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-scheduler v0.0.0-20251209073509-71e0f2506325 + k8s.io/kubectl => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubectl v0.0.0-20251209073509-71e0f2506325 + k8s.io/kubelet => github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20251209073509-71e0f2506325 + k8s.io/kubernetes => github.com/kcp-dev/kubernetes v0.0.0-20251209073509-71e0f2506325 + k8s.io/metrics => github.com/kcp-dev/kubernetes/staging/src/k8s.io/metrics v0.0.0-20251209073509-71e0f2506325 + k8s.io/mount-utils => github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20251209073509-71e0f2506325 + k8s.io/pod-security-admission => github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251209073509-71e0f2506325 + k8s.io/sample-apiserver => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-apiserver v0.0.0-20251209073509-71e0f2506325 + k8s.io/sample-cli-plugin => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-cli-plugin v0.0.0-20251209073509-71e0f2506325 + k8s.io/sample-controller => github.com/kcp-dev/kubernetes/staging/src/k8s.io/sample-controller v0.0.0-20251209073509-71e0f2506325 ) replace ( diff --git a/go.sum b/go.sum index 5de92c7bde6..5c64f7f178b 100644 --- a/go.sum +++ b/go.sum @@ -1,10 +1,7 @@ -cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= -cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= @@ -13,7 +10,6 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/abiosoft/lineprefix v0.1.4 h1:fXu3jc+B2EaS98mTpEL5OH9EKv3scHRb7/gsvlqAD1A= github.com/abiosoft/lineprefix v0.1.4/go.mod h1:Myq9hfXs8e2OmHFvajp3pHxxThZL645XK+BrEQNvNSs= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -24,11 +20,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/datadriven v1.0.2 h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA= github.com/cockroachdb/datadriven v1.0.2/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/coreos/go-oidc v2.3.0+incompatible h1:+5vEsrgprdLjjQ9FzIKAzQz1wwPD+83hQRfUIPh7rO0= @@ -50,12 +43,8 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/egymgmbh/go-prefix-writer v0.0.0-20180609083313-7326ea162eca h1:7oodhZp9MZW0DBkrZXyUsJWKQFy35SVxjZ8K4vHXnk8= github.com/egymgmbh/go-prefix-writer v0.0.0-20180609083313-7326ea162eca/go.mod h1:UhMFM+dnOcm1f0Pve8uqRaxAhEYki+/CuA2BTDp2T04= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= @@ -63,15 +52,12 @@ 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/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-jose/go-jose/v3 v3.0.4 h1:Wp5HA7bLQcKnf6YYao/4kpRpVMp/yf6+pJKV8WFSaNY= github.com/go-jose/go-jose/v3 v3.0.4/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -85,117 +71,104 @@ github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= -github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= -github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= github.com/google/go-cmp v0.5.9/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/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0 h1:FbSCl+KggFl+Ocym490i/EyXF4lPgLoUtcSWquBM0Rs= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= -github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I= +github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/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/embeddedetcd v1.0.3-0.20250805142358-a4839a83564a h1:P2+BWZW1yzo/TEOgKcdLgDMhJuXwH6Yv79vji+ikfRk= -github.com/kcp-dev/embeddedetcd v1.0.3-0.20250805142358-a4839a83564a/go.mod h1:/rP5E1xbbdx0MhSh1vKHzIzDadKgE91FGpNYpngtks0= -github.com/kcp-dev/kubernetes v0.0.0-20251113163256-f038ec6bf609 h1:8DiC1IIQPpDsJAzLO56pNNAYiZGbb9EgQCe3tfmKfSo= -github.com/kcp-dev/kubernetes v0.0.0-20251113163256-f038ec6bf609/go.mod h1:2aO1Dsx/yaKo5eY82uclkPNIACJzUT1IkIWC3iCwh2k= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20251113163256-f038ec6bf609 h1:jSKhxCvhMqM44NFXFbk1uGr0K4sLTZaQvdsmrgqbb9M= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20251113163256-f038ec6bf609/go.mod h1:uiagPCm7MlCfQpIm2xwPTRf8727wbCZCMgHI9uHcMpg= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20251113163256-f038ec6bf609 h1:2eF4Jq/1bTL2OObwStwOOik1WdLVPOSwHyuiRXjWWbg= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20251113163256-f038ec6bf609/go.mod h1:7YRhmmIzd7elyfRQ96hbOfFq7+OvGNZljO5Z/E+mLto= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20251113163256-f038ec6bf609 h1:rWrbf+5hCLVYEw806tRLAH3GfT5apDu4qtx5MrrQT1w= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20251113163256-f038ec6bf609/go.mod h1:6XMZJoNYwuMArBvS2acFkTR1KqyHSp2QXRLRx9eTk5w= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20251113163256-f038ec6bf609 h1:yMWrq/DpozipIHUNrjnqOHr/55rl8eMFlfJJFYSjaTk= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20251113163256-f038ec6bf609/go.mod h1:nG4FME1ik2lKNo+jGhrGsZRiI/+1r8Nuldah1bPqqg8= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20251113163256-f038ec6bf609 h1:2LaaFCAetzhS+OJE1qM3T5/9iCy4V4z1gaa+AFhy4vk= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20251113163256-f038ec6bf609/go.mod h1:omt22adyHpxAelVTfG1bssg+xoAUc+Cg+0CXn0Oaim0= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20251113163256-f038ec6bf609 h1:qdPGsPtkVr745pAKJGAoI0VCsRSZRgkARZ90YoW22rY= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20251113163256-f038ec6bf609/go.mod h1:nXTCfvAs2vJpEtEfqg9V41y2WTHDXpyZH9wCcrjmo30= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20251113163256-f038ec6bf609 h1:BvYXXy1d61Tmwi1sEW5TUDQdPZLzSvfErA5gWSV0Ehg= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20251113163256-f038ec6bf609/go.mod h1:1ikcJzlxpA6y0RxQSwbkRRnAGJkB75uCiE0E4RNl6+g= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20251113163256-f038ec6bf609 h1:OMfthydQ93DzJQkJFMcKbojRLrMxf1300IY8Mj7JkH0= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20251113163256-f038ec6bf609/go.mod h1:RX2IjSElf81bJsT+EIEl5Tu9J4P0CCl+PuAYaCr4EtE= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20251113163256-f038ec6bf609 h1:XUyq0muKXDSzAm8uCUpsSdJygEtaNWJdo4vri2NvvmI= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20251113163256-f038ec6bf609/go.mod h1:Z+AmCbP/esJzSqF5Otj149NR+8fqJHWBgokGrRp0a1c= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20251113163256-f038ec6bf609 h1:AjlY6ZKODFN0pZaQpZ15wl80uTbECOE9NNEp2ch3bW4= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20251113163256-f038ec6bf609/go.mod h1:b6Waw1fHiEdwnHRJLm7d8EasjoSFmWZh1MF0Z/czKyI= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20251113163256-f038ec6bf609 h1:2Ho+TwU6fEXAKVrhdjlno6lpLO8DwUiinHS+8HtcOVo= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20251113163256-f038ec6bf609/go.mod h1:3k8rmdjxcntnew+XBn47yOUTO2nPCQaecv5wzetRYyk= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20251113163256-f038ec6bf609 h1:yLgFchb42yXyGi0JPbNgyOYfo3kJ3LpQgMIZ7JRoBmI= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20251113163256-f038ec6bf609/go.mod h1:fS9qFTkZ4N5YDjYMkUp7TDsnh1Q/3h8UFQYnWsxvh1k= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-client v0.0.0-20251113163256-f038ec6bf609 h1:KjRWgn1vh2pw1yaVbTqgr3W+Vvj7iUDtz9PsjCF+Uro= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-client v0.0.0-20251113163256-f038ec6bf609/go.mod h1:HBtC07hEmkJUx+XBd/QG4CgsPjXvWmJsQZZYcFOXylM= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20251113163256-f038ec6bf609 h1:b/doa7HpDd30f+Ew5cDj0JHM3e3Ij855Vcsezc4z4rk= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20251113163256-f038ec6bf609/go.mod h1:d4Jip55++ADXt6dRDyf1SAG7er6Q30an/ehvbhFs4B4= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20251113163256-f038ec6bf609 h1:fP6hz9LFEHEeiv/CK9iL90+NP7Vnq8hPD3oD4rFWHAU= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20251113163256-f038ec6bf609/go.mod h1:lKhTTK/12GYIA2oEs6IGcFv+aPbCuaHsydiEQefevaE= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20251113163256-f038ec6bf609 h1:CSfUOnUfwySXRpBqR40ocNM/FJGDPB3OqUYr7fYnFfk= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20251113163256-f038ec6bf609/go.mod h1:Lb2Ld154rYz0E+uofpodh0dE+aQRjgv1/73k3GGm0s8= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/externaljwt v0.0.0-20251113163256-f038ec6bf609 h1:79ZpMQcOE3aJbgxVwkSBHXaKpW6CGK05eYU53VqO7v0= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/externaljwt v0.0.0-20251113163256-f038ec6bf609/go.mod h1:GuecfuXgcZOYqLPNayZRArronWcDfj/cN6Iy3LR9TiI= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20251113163256-f038ec6bf609 h1:e+1NA93I+VJHaGM8rXxeWwCDOKDM8WF5GGkKlnNjp1c= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20251113163256-f038ec6bf609/go.mod h1:kwWmCq21qHjyuqQeIaShb3CUcfgX89fWTgjEbDle9XM= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20251113163256-f038ec6bf609 h1:XNHaH5TCq+3tG+duWEB+mPpyXC0AO9Xfv24BmMbInYA= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20251113163256-f038ec6bf609/go.mod h1:Ih7H85EqWEajAP6WkXZUtvUmD6ddwvyt0SIpjk3DplQ= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20251113163256-f038ec6bf609 h1:u9u32joufxkzbGAz6ItGHMgN7SbA3eoBP9xovccO2Fk= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20251113163256-f038ec6bf609/go.mod h1:Z84acvV34LpS/2rOELPyQkqsCDGLauQoJx/KfyW66Vg= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20251113163256-f038ec6bf609 h1:FTiK0Z1n9G3uRqsr25XEWUSLa4Yyw8mAa2Sz8W4oZ0A= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20251113163256-f038ec6bf609/go.mod h1:s8rpXfLbDWrlZuuJdO5NaU0DTUv2yhpnvw48xBboe30= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20251113163256-f038ec6bf609 h1:tTiykz3yhuV9xBucT74XXISgMuOh27IAzeIL98T7Oes= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20251113163256-f038ec6bf609/go.mod h1:+NkiLP9jzw+V2elKWd6vEyTmHVq+Ezlu98mkEEV56xE= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251113163256-f038ec6bf609 h1:jHWoihYGFSeWso8afipM16sF+/PwILfuK1FY7JB8v9I= -github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251113163256-f038ec6bf609/go.mod h1:ojja4FkmJXdImCvve5aoI1Why+aszlu65B98g8udBXE= +github.com/kcp-dev/embeddedetcd v1.1.0 h1:4u5BwZdD43rMnZc3VOpj/VS/+WgJDknv1wuyy4rVkzM= +github.com/kcp-dev/embeddedetcd v1.1.0/go.mod h1:KNR9s+3UcXtNamapwLH7M/8ZMZCHpIU5YalOAEjOwJg= +github.com/kcp-dev/kubernetes v0.0.0-20251209073509-71e0f2506325 h1:Q5M1NE3GFWU/upqPCRHtWtTq0bBNFLjq296zzKmOI9E= +github.com/kcp-dev/kubernetes v0.0.0-20251209073509-71e0f2506325/go.mod h1:5abjPkqQJKTbeBJpHD8ssZvASKmoYs0WN2WPyyhkwrw= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20251209073509-71e0f2506325 h1:xjt3y1Uw+x1LQbtBesGohvyoQ2YRzz4c0rv3BwG0vkA= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/api v0.0.0-20251209073509-71e0f2506325/go.mod h1:3Y5V97lz2MrKYzHlUaXejkj+coCmqde9E9WwVFuWRXE= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20251209073509-71e0f2506325 h1:MmzvuhedtyTW49qG0VWf9X54OwaRslUk6KyC7vhsuI4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiextensions-apiserver v0.0.0-20251209073509-71e0f2506325/go.mod h1:NL2CyapDmJ+5XVVY8qr6niVA3UHVF17kPl0zh6ohkVM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20251209073509-71e0f2506325 h1:nu1GCQxCQ18IyBtrY9i6qwA1Pk8dr3ErNTDs5vDdUqo= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apimachinery v0.0.0-20251209073509-71e0f2506325/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20251209073509-71e0f2506325 h1:YhSbN6w0bbxt0kKS7yIUivV9KBo1488HG0pPnYojP9U= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/apiserver v0.0.0-20251209073509-71e0f2506325/go.mod h1:msyjTyI8TyfhYybEkao5LA8bUrVqz1xhic5zxsfejoM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20251209073509-71e0f2506325 h1:DcaY2DZCLZfQ2/0MfdArT8LZuWP7r3qLNO7mxd/f+oo= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/client-go v0.0.0-20251209073509-71e0f2506325/go.mod h1:EA6EHLX97x5H59hA02pKPLlZBMQEYnYMsIMglrufpFo= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20251209073509-71e0f2506325 h1:O1ALzU8pueHW1GySw3xwWCBPM50ZyP1zxSD+w5iechw= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cloud-provider v0.0.0-20251209073509-71e0f2506325/go.mod h1:ZZzwSqYu465kx/03+L6Axo9WQxQxiJJuR7kx8i+km6o= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20251209073509-71e0f2506325 h1:RSgA4aOtryCIv+MjbQcCO342toy7c5qEwhgdPBoMevs= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cluster-bootstrap v0.0.0-20251209073509-71e0f2506325/go.mod h1:L+CgxxDLy//AhiEyqsCdiTs4TphPxXI1IQArc9jwMO8= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20251209073509-71e0f2506325 h1:iEsKmsBxaeiCQF4ykmcp0jJZOS55n09G4ujbpxT5PLc= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/code-generator v0.0.0-20251209073509-71e0f2506325/go.mod h1:WO4jix1ghA2Qv/tXyNSQl6JXSm6G7jR2AVaOz4w6Z5M= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20251209073509-71e0f2506325 h1:a2cdebBcc0N3IjIm44fPtMDYS2NBlT9DJOoVHNTXmtc= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-base v0.0.0-20251209073509-71e0f2506325/go.mod h1:ji6LERznCQ/l4DKb74Vd/5W8Q89b7SvBen7B4AMY0Oo= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20251209073509-71e0f2506325 h1:SFYpPsSMpda0SguKeThKLPrgTSWIXxeyngWdJ/R/L7o= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/component-helpers v0.0.0-20251209073509-71e0f2506325/go.mod h1:l7hECO13A52pGPFD+SlZJ+EGCuRoVOm0wtdDCMQQkf4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20251209073509-71e0f2506325 h1:MP14BFJHdqziUx7rBbVY1lrp+dzOPhAxmCotFHSgN1E= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/controller-manager v0.0.0-20251209073509-71e0f2506325/go.mod h1:r87/fGxIfARYiYYbMjR8AIOqf25GMlSSqL/F05+OIzI= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20251209073509-71e0f2506325 h1:sT8Dy9c9es1s8z5Q1JdMDJelzhjUh5DKpapUUfnZA/I= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-api v0.0.0-20251209073509-71e0f2506325/go.mod h1:4qVUjidMg7/Z9YGZpqIDygbkPWkg3mkS1PvOx/kpHTE= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-client v0.0.0-20251209073509-71e0f2506325 h1:PM1F3TGLjMgVmDqnSwH7gi09aj5APPq6zysTYR7LpBA= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/cri-client v0.0.0-20251209073509-71e0f2506325/go.mod h1:WVLptW3AzZFX1zSlSxuN9oUO/R6A1+6I4XFZBjhOV4A= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20251209073509-71e0f2506325 h1:0ZJhntZSNdcJZRf4s9gX7yLFxUDAvEvTYk1S8TFSmBs= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/csi-translation-lib v0.0.0-20251209073509-71e0f2506325/go.mod h1:yIEfKOC6kDBKmPljSFyWf3OJl6qndPa1Z8CZnvM1zAk= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20251209073509-71e0f2506325 h1:pb9jaKIa5clIk/tYAgc18ew3woxxnIxuJ5gdmkqk9c4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/dynamic-resource-allocation v0.0.0-20251209073509-71e0f2506325/go.mod h1:ScEkH9zs6QurmNvJvTPTbs1BbrUH6PBMrvT1qKee6U4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20251209073509-71e0f2506325 h1:uZZs8yoYraOewGYj7SAS35PU8hzExs9KKJVHleUHEzM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/endpointslice v0.0.0-20251209073509-71e0f2506325/go.mod h1:RilV1eQyuARqygtpZNyB+JG59w6kCKMzLeYYQfMqZqM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/externaljwt v0.0.0-20251209073509-71e0f2506325 h1:PYFuqGJsvRhubNbXQjRpo/bbaytoEsM0PeTD0M+C784= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/externaljwt v0.0.0-20251209073509-71e0f2506325/go.mod h1:LIqFAVwSkcWVlP3c78wxe2VGmgDySxfqX/wwXzVrV/Q= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20251209073509-71e0f2506325 h1:LDvVhQaX9MIB/ODAi5GJHWkRZKbDlrz5dGyQFRUDmbQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kms v0.0.0-20251209073509-71e0f2506325/go.mod h1:s1CFkLG7w9eaTYvctOxosx88fl4spqmixnNpys0JAtM= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20251209073509-71e0f2506325 h1:xk7aVaDmSc1WhYukrK18DpjHCsVjcHHC7Bq68NvDYJI= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-aggregator v0.0.0-20251209073509-71e0f2506325/go.mod h1:GOPdnpyxb2xGzTzBC7NOr0rpnWcGH8/pY/tPHX0Ou44= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20251209073509-71e0f2506325 h1:1AGTMUxjybC24uGSvPoGTwgwmhb9VZVW8yELVt3Y1d4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kube-controller-manager v0.0.0-20251209073509-71e0f2506325/go.mod h1:IDd35yynkN5S0lWnaz/xF+/fZSf668aSIVe+GQpR5tI= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20251209073509-71e0f2506325 h1:DYA9zFO/f86O9FMAn0HFOjs+Fpy5WejgpGQPsjrlksQ= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/kubelet v0.0.0-20251209073509-71e0f2506325/go.mod h1:5xnzJEi0iAetJLsqhsO5yMAnW3yPZ+zs32oh4VAKgc0= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20251209073509-71e0f2506325 h1:o/Vgg1GxrhZs9BEqmSy/+AqzJdt9V3BsBQFE2Um8hX4= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/mount-utils v0.0.0-20251209073509-71e0f2506325/go.mod h1:MIjjYlqJ0ziYQg0MO09kc9S96GIcMkhF/ay9MncF0GA= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251209073509-71e0f2506325 h1:llywp60Q16pDM1piFhMEMAqtf8zFuykR3KXpZLm/RUo= +github.com/kcp-dev/kubernetes/staging/src/k8s.io/pod-security-admission v0.0.0-20251209073509-71e0f2506325/go.mod h1:3bwMqCfzs5exVFZydu9eBJkw5UbmNzDvxCYT7JWYVAo= 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/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -224,8 +197,9 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= @@ -242,8 +216,6 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/selinux v1.11.1 h1:nHFvthhM0qY8/m+vfhJylliSshm8G1jJ2jDMcgULaH8= github.com/opencontainers/selinux v1.11.1/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -253,7 +225,6 @@ github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8 github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io= @@ -265,11 +236,9 @@ github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -282,14 +251,12 @@ github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -308,51 +275,50 @@ github.com/xrstf/mockoidc v0.0.0-20250721141841-711cc4e835f6/go.mod h1:VqIgTtKVz github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= -go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= -go.etcd.io/etcd/api/v3 v3.5.21 h1:A6O2/JDb3tvHhiIz3xf9nJ7REHvtEFJJ3veW3FbCnS8= -go.etcd.io/etcd/api/v3 v3.5.21/go.mod h1:c3aH5wcvXv/9dqIw2Y810LDXJfhSYdHQ0vxmP3CCHVY= -go.etcd.io/etcd/client/pkg/v3 v3.5.21 h1:lPBu71Y7osQmzlflM9OfeIV2JlmpBjqBNlLtcoBqUTc= -go.etcd.io/etcd/client/pkg/v3 v3.5.21/go.mod h1:BgqT/IXPjK9NkeSDjbzwsHySX3yIle2+ndz28nVsjUs= -go.etcd.io/etcd/client/v2 v2.305.21 h1:eLiFfexc2mE+pTLz9WwnoEsX5JTTpLCYVivKkmVXIRA= -go.etcd.io/etcd/client/v2 v2.305.21/go.mod h1:OKkn4hlYNf43hpjEM3Ke3aRdUkhSl8xjKjSf8eCq2J8= -go.etcd.io/etcd/client/v3 v3.5.21 h1:T6b1Ow6fNjOLOtM0xSoKNQt1ASPCLWrF9XMHcH9pEyY= -go.etcd.io/etcd/client/v3 v3.5.21/go.mod h1:mFYy67IOqmbRf/kRUvsHixzo3iG+1OF2W2+jVIQRAnU= -go.etcd.io/etcd/pkg/v3 v3.5.21 h1:jUItxeKyrDuVuWhdh0HtjUANwyuzcb7/FAeUfABmQsk= -go.etcd.io/etcd/pkg/v3 v3.5.21/go.mod h1:wpZx8Egv1g4y+N7JAsqi2zoUiBIUWznLjqJbylDjWgU= -go.etcd.io/etcd/raft/v3 v3.5.21 h1:dOmE0mT55dIUsX77TKBLq+RgyumsQuYeiRQnW/ylugk= -go.etcd.io/etcd/raft/v3 v3.5.21/go.mod h1:fmcuY5R2SNkklU4+fKVBQi2biVp5vafMrWUEj4TJ4Cs= -go.etcd.io/etcd/server/v3 v3.5.21 h1:9w0/k12majtgarGmlMVuhwXRI2ob3/d1Ik3X5TKo0yU= -go.etcd.io/etcd/server/v3 v3.5.21/go.mod h1:G1mOzdwuzKT1VRL7SqRchli/qcFrtLBTAQ4lV20sXXo= +go.etcd.io/bbolt v1.4.2 h1:IrUHp260R8c+zYx/Tm8QZr04CX+qWS5PGfPdevhdm1I= +go.etcd.io/bbolt v1.4.2/go.mod h1:Is8rSHO/b4f3XigBC0lL0+4FwAQv3HXEEIgFMuKHceM= +go.etcd.io/etcd/api/v3 v3.6.4 h1:7F6N7toCKcV72QmoUKa23yYLiiljMrT4xCeBL9BmXdo= +go.etcd.io/etcd/api/v3 v3.6.4/go.mod h1:eFhhvfR8Px1P6SEuLT600v+vrhdDTdcfMzmnxVXXSbk= +go.etcd.io/etcd/client/pkg/v3 v3.6.4 h1:9HBYrjppeOfFjBjaMTRxT3R7xT0GLK8EJMVC4xg6ok0= +go.etcd.io/etcd/client/pkg/v3 v3.6.4/go.mod h1:sbdzr2cl3HzVmxNw//PH7aLGVtY4QySjQFuaCgcRFAI= +go.etcd.io/etcd/client/v3 v3.6.4 h1:YOMrCfMhRzY8NgtzUsHl8hC2EBSnuqbR3dh84Uryl7A= +go.etcd.io/etcd/client/v3 v3.6.4/go.mod h1:jaNNHCyg2FdALyKWnd7hxZXZxZANb0+KGY+YQaEMISo= +go.etcd.io/etcd/pkg/v3 v3.6.4 h1:fy8bmXIec1Q35/jRZ0KOes8vuFxbvdN0aAFqmEfJZWA= +go.etcd.io/etcd/pkg/v3 v3.6.4/go.mod h1:kKcYWP8gHuBRcteyv6MXWSN0+bVMnfgqiHueIZnKMtE= +go.etcd.io/etcd/server/v3 v3.6.4 h1:LsCA7CzjVt+8WGrdsnh6RhC0XqCsLkBly3ve5rTxMAU= +go.etcd.io/etcd/server/v3 v3.6.4/go.mod h1:aYCL/h43yiONOv0QIR82kH/2xZ7m+IWYjzRmyQfnCAg= +go.etcd.io/raft/v3 v3.6.0 h1:5NtvbDVYpnfZWcIHgGRk9DyzkBIXOi8j+DDp1IcnUWQ= +go.etcd.io/raft/v3 v3.6.0/go.mod h1:nLvLevg6+xrVtHUmVaTcTz603gQPHfh7kUAwV6YpfGo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= -go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= -go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= -go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= -go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= -go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= -go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= -go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= -go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -360,27 +326,17 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-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-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -390,13 +346,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 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-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-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= @@ -404,14 +355,11 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/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= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -447,10 +395,6 @@ golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= 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-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 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= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -462,26 +406,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= +google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -497,29 +427,24 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.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= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4 h1:iicENHE63xPBlGQeany8LqrH40Wh/48QhMRI/mGVsqA= -k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/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= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/pkg/admission/logicalcluster/admission_test.go b/pkg/admission/logicalcluster/admission_test.go index bc49b86f8b2..e0b179c786f 100644 --- a/pkg/admission/logicalcluster/admission_test.go +++ b/pkg/admission/logicalcluster/admission_test.go @@ -144,8 +144,7 @@ func TestAdmit(t *testing.T) { "apiVersion": corev1alpha1.SchemeGroupVersion.String(), "kind": "Shard", "metadata": map[string]interface{}{ - "name": "test", - "creationTimestamp": nil, + "name": "test", }, "spec": map[string]interface{}{ "baseURL": "", diff --git a/pkg/admission/workspacetypeexists/admission_test.go b/pkg/admission/workspacetypeexists/admission_test.go index 3ac4b7f98e5..456c5da0b2b 100644 --- a/pkg/admission/workspacetypeexists/admission_test.go +++ b/pkg/admission/workspacetypeexists/admission_test.go @@ -82,8 +82,7 @@ func TestAdmit(t *testing.T) { "apiVersion": corev1alpha1.SchemeGroupVersion.String(), "kind": "Shard", "metadata": map[string]interface{}{ - "name": "test", - "creationTimestamp": nil, + "name": "test", }, "spec": map[string]interface{}{ "baseURL": "", diff --git a/pkg/authorization/decorator_test.go b/pkg/authorization/decorator_test.go index 00657856562..ef646f9ae86 100644 --- a/pkg/authorization/decorator_test.go +++ b/pkg/authorization/decorator_test.go @@ -23,7 +23,6 @@ import ( "github.com/google/go-cmp/cmp" - auditapis "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/authorization/authorizer" ) @@ -218,17 +217,14 @@ func TestDecorator(t *testing.T) { } { t.Run(name, func(t *testing.T) { ctx := audit.WithAuditContext(context.Background()) - auditCtx := audit.AuditContextFrom(ctx) - auditCtx.Event = auditapis.Event{ - Level: auditapis.LevelMetadata, - } + attr := authorizer.AttributesRecord{} dec, reason, _ := tc.authz.Authorize(ctx, attr) if dec != tc.wantDecision { t.Errorf("want decision %v got %v", tc.wantDecision, dec) } - ev := audit.AuditEventFrom(ctx) - if diff := cmp.Diff(tc.wantAudit, ev.Annotations); diff != "" { + ev := audit.AuditContextFrom(ctx) + if diff := cmp.Diff(tc.wantAudit, ev.GetEventAnnotations()); diff != "" { t.Errorf("audit log annotations differ: %v", diff) } if tc.wantReason != reason { diff --git a/pkg/features/kcp_features.go b/pkg/features/kcp_features.go index 701efe99ff4..4d8d4999047 100644 --- a/pkg/features/kcp_features.go +++ b/pkg/features/kcp_features.go @@ -67,6 +67,8 @@ var DefaultFeatureGate = utilfeature.DefaultFeatureGate func init() { utilruntime.Must(utilfeature.DefaultMutableFeatureGate.AddVersioned(defaultVersionedGenericControlPlaneFeatureGates)) + + utilruntime.Must(disableFeatures()) } func KnownFeatures() []string { @@ -159,3 +161,19 @@ var defaultVersionedGenericControlPlaneFeatureGates = map[featuregate.Feature]fe {Version: version.MustParse("1.26"), Default: true, PreRelease: featuregate.Alpha}, }, } + +// disableFeatures sets features that kcp wants disabled/enabled by default. +func disableFeatures() error { + toDisable := map[featuregate.Feature]bool{ + // We disable SizeBasedListCostEstimate by default in kcp as stats collector does not have cluster awarness yet. + // We add this here to track changes in future k8s releases. + genericfeatures.SizeBasedListCostEstimate: false, + } + for f, v := range toDisable { + err := utilfeature.DefaultMutableFeatureGate.Set(fmt.Sprintf("%s=%v", f, v)) + if err != nil { + return err + } + } + return nil +} diff --git a/pkg/reconciler/garbagecollector/garbagecollector_controller.go b/pkg/reconciler/garbagecollector/garbagecollector_controller.go index 70cbe406eb6..2013666510a 100644 --- a/pkg/reconciler/garbagecollector/garbagecollector_controller.go +++ b/pkg/reconciler/garbagecollector/garbagecollector_controller.go @@ -236,6 +236,7 @@ func (c *Controller) process(ctx context.Context, key string) error { if err := c.startGarbageCollectorForLogicalCluster(ctx, clusterName); err != nil { cancel() + delete(c.cancelFuncs, clusterName) return fmt.Errorf("error starting garbage collector controller for cluster %q: %w", clusterName, err) } @@ -245,11 +246,9 @@ func (c *Controller) process(ctx context.Context, key string) error { func (c *Controller) startGarbageCollectorForLogicalCluster(ctx context.Context, clusterName logicalcluster.Name) error { logger := klog.FromContext(ctx) - kubeClient := c.kubeClusterClient.Cluster(clusterName.Path()) - garbageCollector, err := garbagecollector.NewGarbageCollector( ctx, - kubeClient, + c.kubeClusterClient.Cluster(clusterName.Path()), c.metadataClient.Cluster(clusterName.Path()), c.dynamicDiscoverySharedInformerFactory.RESTMapper(), c.ignoredResources, @@ -270,7 +269,7 @@ func (c *Controller) startGarbageCollectorForLogicalCluster(ctx context.Context, queue: workqueue.NewTypedRateLimitingQueueWithConfig( workqueue.DefaultTypedControllerRateLimiter[string](), workqueue.TypedRateLimitingQueueConfig[string]{ - Name: "quota-" + clusterName.String(), + Name: "gc-" + clusterName.String(), }, ), work: func(ctx context.Context) { @@ -297,8 +296,11 @@ func (c *Controller) startGarbageCollectorForLogicalCluster(ctx context.Context, // Do this in a goroutine to avoid holding up a worker in the event ResyncMonitors stalls for whatever reason go func() { // Make sure the GC monitors are synced at least once - //nolint:errcheck - garbageCollector.ResyncMonitors(ctx, c.dynamicDiscoverySharedInformerFactory) + err = garbageCollector.ResyncMonitors(ctx, c.dynamicDiscoverySharedInformerFactory) + if err != nil { + logger.Error(err, "failed to sync garbage collector monitors for the first time") + return + } // Initial sync timeout is set to 30s - as it was hardcoded in // e8b1d7dc24713db99808028e0d02bacf6d48e01f in k/k. Should it timeout, diff --git a/pkg/server/config.go b/pkg/server/config.go index e4da97e0ba6..ccc3a7cd664 100644 --- a/pkg/server/config.go +++ b/pkg/server/config.go @@ -206,6 +206,7 @@ func NewConfig(ctx context.Context, opts kcpserveroptions.CompletedOptions) (*Co if err != nil { return nil, err } + c.EmbeddedEtcd.LogLevel = "error" } var err error diff --git a/pkg/server/options/flags.go b/pkg/server/options/flags.go index b45ae0b95f0..bf87e9f8e93 100644 --- a/pkg/server/options/flags.go +++ b/pkg/server/options/flags.go @@ -159,11 +159,14 @@ var ( "show-hidden-metrics-for-version", // The previous version for which you want to show hidden metrics. Only the previous minor version is meaningful, other values will not be allowed. The format is ., e.g.: '1.16'. The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, rather than being surprised when they are permanently removed in the release after that. // misc flags - "enable-logs-handler", // If true, install a /logs handler for the apiserver logs. - "event-ttl", // Amount of time to retain events. - "max-connection-bytes-per-sec", // If non-zero, throttle each user connection to this number of bytes/sec. Currently only applies to long-running requests. - "proxy-client-cert-file", // Client certificate used to prove the identity of the aggregator or kube-apiserver when it must call out during a request. This includes proxying requests to a user api-server and calling out to webhook admission plugins. It is expected that this cert includes a signature from the CA in the --requestheader-client-ca-file flag. That CA is published in the 'extension-apiserver-authentication' configmap in the kube-system namespace. Components receiving calls from kube-aggregator should use that CA to perform their half of the mutual TLS verification. - "proxy-client-key-file", // Private key for the client certificate used to prove the identity of the aggregator or kube-apiserver when it must call out during a request. This includes proxying requests to a user api-server and calling out to webhook admission plugins. + "enable-logs-handler", // If true, install a /logs handler for the apiserver logs. + "event-ttl", // Amount of time to retain events. + "max-connection-bytes-per-sec", // If non-zero, throttle each user connection to this number of bytes/sec. Currently only applies to long-running requests. + "proxy-client-cert-file", // Client certificate used to prove the identity of the aggregator or kube-apiserver when it must call out during a request. This includes proxying requests to a user api-server and calling out to webhook admission plugins. It is expected that this cert includes a signature from the CA in the --requestheader-client-ca-file flag. That CA is published in the 'extension-apiserver-authentication' configmap in the kube-system namespace. Components receiving calls from kube-aggregator should use that CA to perform their half of the mutual TLS verification. + "proxy-client-key-file", // Private key for the client certificate used to prove the identity of the aggregator or kube-apiserver when it must call out during a request. This includes proxying requests to a user api-server and calling out to webhook admission plugins. + "coordinated-leadership-lease-duration", // The duration of the lease used for Coordinated Leader Election. + "coordinated-leadership-renew-deadline", // The deadline for renewing a coordinated leader election lease. + "coordinated-leadership-retry-period", // The period for retrying to renew a coordinated leader election lease. ) disallowedFlags = sets.New[string]( @@ -182,10 +185,12 @@ var ( "enable-garbage-collector", // Enables the generic garbage collector. MUST be synced with the corresponding flag of the kube-controller-manager. // admission flags - "admission-control-config-file", // File with admission control configuration. - "disable-admission-plugins", // admission plugins that should be disabled although they are in the default enabled plugins list (NamespaceLifecycle). Comma-delimited list of admission plugins: MutatingAdmissionWebhook, NamespaceLifecycle, ValidatingAdmissionWebhook. The order of plugins in this flag does not matter. - "enable-admission-plugins", // admission plugins that should be enabled in addition to default enabled ones (NamespaceLifecycle). Comma-delimited list of admission plugins: MutatingAdmissionWebhook, NamespaceLifecycle, ValidatingAdmissionWebhook. The order of plugins in this flag does not matter. - "admission-control", // Deprecated: Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version. + "default-not-ready-toleration-seconds", // Indicates the tolerationSeconds of the toleration for notReady:NoExecute that is added by default to every pod that does not already have such a toleration. + "default-unreachable-toleration-seconds", // Indicates the tolerationSeconds of the toleration for unreachable:NoExecute that is added by default to every pod that does not already have such a toleration. + "admission-control-config-file", // File with admission control configuration. + "disable-admission-plugins", // admission plugins that should be disabled although they are in the default enabled plugins list (NamespaceLifecycle). Comma-delimited list of admission plugins: MutatingAdmissionWebhook, NamespaceLifecycle, ValidatingAdmissionWebhook. The order of plugins in this flag does not matter. + "enable-admission-plugins", // admission plugins that should be enabled in addition to default enabled ones (NamespaceLifecycle). Comma-delimited list of admission plugins: MutatingAdmissionWebhook, NamespaceLifecycle, ValidatingAdmissionWebhook. The order of plugins in this flag does not matter. + "admission-control", // Deprecated: Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version. // egress selector flags "egress-selector-config-file", // File with apiserver egress selector configuration. diff --git a/pkg/server/options/options.go b/pkg/server/options/options.go index 17fd322c3cb..1a7716f5289 100644 --- a/pkg/server/options/options.go +++ b/pkg/server/options/options.go @@ -26,6 +26,7 @@ import ( "github.com/spf13/pflag" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" genericapiserveroptions "k8s.io/apiserver/pkg/server/options" cliflag "k8s.io/component-base/cli/flag" @@ -133,6 +134,7 @@ func NewOptions(rootDir string) *Options { // turn on the watch cache o.GenericControlPlane.Etcd.EnableWatchCache = true + o.GenericControlPlane.SystemNamespaces = append(o.GenericControlPlane.SystemNamespaces, metav1.NamespaceSystem) return o } diff --git a/pkg/virtual/framework/forwardingregistry/functions.go b/pkg/virtual/framework/forwardingregistry/functions.go index cbab397695c..4c5c50d5172 100644 --- a/pkg/virtual/framework/forwardingregistry/functions.go +++ b/pkg/virtual/framework/forwardingregistry/functions.go @@ -19,7 +19,7 @@ package forwardingregistry import ( "context" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" + "sigs.k8s.io/structured-merge-diff/v6/fieldpath" metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/virtual/framework/internalapis/fixtures/configmaps.yaml b/pkg/virtual/framework/internalapis/fixtures/configmaps.yaml index f11e6d55043..b0f7fed1cb9 100644 --- a/pkg/virtual/framework/internalapis/fixtures/configmaps.yaml +++ b/pkg/virtual/framework/internalapis/fixtures/configmaps.yaml @@ -1,5 +1,4 @@ metadata: - creationTimestamp: null name: internal.configmaps.core spec: group: "" diff --git a/pkg/virtual/framework/internalapis/fixtures/namespaces.yaml b/pkg/virtual/framework/internalapis/fixtures/namespaces.yaml index 7cfeb8da11f..af053b6624e 100644 --- a/pkg/virtual/framework/internalapis/fixtures/namespaces.yaml +++ b/pkg/virtual/framework/internalapis/fixtures/namespaces.yaml @@ -1,5 +1,4 @@ metadata: - creationTimestamp: null name: internal.namespaces.core spec: group: "" diff --git a/pkg/virtual/framework/internalapis/fixtures/workspaces.yaml b/pkg/virtual/framework/internalapis/fixtures/workspaces.yaml index 4342e6bd8f0..09ce6dd1154 100644 --- a/pkg/virtual/framework/internalapis/fixtures/workspaces.yaml +++ b/pkg/virtual/framework/internalapis/fixtures/workspaces.yaml @@ -1,5 +1,4 @@ metadata: - creationTimestamp: null name: internal.workspaces.tenancy.kcp.io spec: group: tenancy.kcp.io diff --git a/pkg/virtual/framework/transforming/client.go b/pkg/virtual/framework/transforming/client.go deleted file mode 100644 index 608a5e4e257..00000000000 --- a/pkg/virtual/framework/transforming/client.go +++ /dev/null @@ -1,449 +0,0 @@ -/* -Copyright 2022 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 transforming - -import ( - "context" - "errors" - - "github.com/go-logr/logr" - - kerrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/dynamic" - "k8s.io/klog/v2" - - kcpdynamic "github.com/kcp-dev/client-go/dynamic" - "github.com/kcp-dev/logicalcluster/v3" - - "github.com/kcp-dev/kcp/pkg/logging" - clientdynamic "github.com/kcp-dev/kcp/pkg/virtual/framework/client/dynamic" -) - -type transformingDynamicClusterClient struct { - transformer ResourceTransformer - delegate kcpdynamic.ClusterInterface -} - -func (c *transformingDynamicClusterClient) Cluster(name logicalcluster.Path) dynamic.Interface { - return &transformingDynamicClient{ - transformer: c.transformer, - delegate: c.delegate.Cluster(name), - } -} - -func (c *transformingDynamicClusterClient) Resource(resource schema.GroupVersionResource) kcpdynamic.ResourceClusterInterface { - delegate := c.delegate.Resource(resource) - return &transformingResourceClusterClient{ - transformingListerWatcherClient: transformingListerWatcherClient{ - delegate: delegate, - transformer: c.transformer, - resourceClient: func(resource logicalcluster.Object) dynamic.ResourceInterface { - return delegate.Cluster(logicalcluster.From(resource).Path()) - }, - resource: resource, - }, - delegate: delegate, - } -} - -type ResourceInterfaceWithResults interface { - dynamic.ResourceInterface - clientdynamic.DeleterWithResults -} - -type transformingResourceClusterClient struct { - transformingListerWatcherClient - delegate kcpdynamic.ResourceClusterInterface -} - -func (trc *transformingResourceClusterClient) Cluster(workspace logicalcluster.Path) dynamic.NamespaceableResourceInterface { - delegate := trc.delegate.Cluster(workspace) - return &transformingNamespaceableResourceClient{ - transformer: trc.transformer, - namespaceableResourceInterface: delegate, - ResourceInterfaceWithResults: &transformingResourceClient{ - transformingListerWatcherClient: transformingListerWatcherClient{ - transformer: trc.transformer, - delegate: delegate, - resourceClient: func(logicalcluster.Object) dynamic.ResourceInterface { return delegate }, - resource: trc.resource, - }, - delegate: delegate, - }, - resource: trc.resource, - } -} - -type transformingDynamicClient struct { - transformer ResourceTransformer - delegate dynamic.Interface -} - -func (c *transformingDynamicClient) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface { - delegate := c.delegate.Resource(resource) - return &transformingNamespaceableResourceClient{ - transformer: c.transformer, - namespaceableResourceInterface: c.delegate.Resource(resource), - ResourceInterfaceWithResults: &transformingResourceClient{ - transformingListerWatcherClient: transformingListerWatcherClient{ - transformer: c.transformer, - delegate: delegate, - resourceClient: func(logicalcluster.Object) dynamic.ResourceInterface { return delegate }, - resource: resource, - }, - delegate: delegate, - }, - resource: resource, - } -} - -type transformingNamespaceableResourceClient struct { - transformer ResourceTransformer - namespaceableResourceInterface dynamic.NamespaceableResourceInterface - ResourceInterfaceWithResults - resource schema.GroupVersionResource -} - -func (c *transformingNamespaceableResourceClient) Namespace(namespace string) dynamic.ResourceInterface { - delegate := c.namespaceableResourceInterface.Namespace(namespace) - return &transformingResourceClient{ - transformingListerWatcherClient: transformingListerWatcherClient{ - transformer: c.transformer, - delegate: delegate, - resourceClient: func(logicalcluster.Object) dynamic.ResourceInterface { return delegate }, - resource: c.resource, - }, - delegate: delegate, - } -} - -type listerWatcher interface { - List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) -} - -type transformingListerWatcherClient struct { - transformer ResourceTransformer - delegate listerWatcher - resourceClient func(resource logicalcluster.Object) dynamic.ResourceInterface - resource schema.GroupVersionResource -} - -// List implements dynamic.ResourceInterface. -// It delegates the List call to the underlying kubernetes client, -// and transforms back every item of the List call result by calling the transformer AfterRead method. -func (tc *transformingListerWatcherClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - var err error - result, err := tc.delegate.List(ctx, opts) - if err != nil && result == nil { - return nil, err - } - - afterLogger := getLogger(ctx).WithValues("action", "list").WithValues("moment", after).WithValues("labelselector", opts.LabelSelector) - transformedResult := result.DeepCopy() - transformedResult.Items = []unstructured.Unstructured{} - for _, item := range result.Items { - itemAfterLogger := logging.WithObject(afterLogger, &item) - itemAfterLogger.Info(startingMessage) - if transformed, err := tc.transformer.AfterRead(tc.resourceClient(&item), ctx, tc.resource, &item, nil); err != nil { - if kerrors.IsNotFound(err) { - itemAfterLogger.Info("transformation did return a NotFound error: let's skip the item") - continue - } - itemAfterLogger.Error(err, errorMessage) - return nil, err - } else { - transformedResult.Items = append(transformedResult.Items, *transformed) - } - } - return transformedResult, err -} - -// Watch implements dynamic.ResourceInterface. -// It delegates the Watch call to the underlying kubernetes client, -// and transforms every event delivered by the kubernetes client watcher, by calling the transformer AfterRead method -// wrapped inside an EventTransformer. -func (tc *transformingListerWatcherClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - var err error - result, err := tc.delegate.Watch(ctx, opts) - if err != nil { - return result, err - } - - afterLogger := getLogger(ctx).WithValues("action", "watch").WithValues("moment", after).WithValues("labelselector", opts.LabelSelector) - - transformingWatcher := NewTransformingWatcher(result, func(event watch.Event) *watch.Event { - transformed := event - eventType := event.Type - itemAfterLogger := afterLogger.WithValues("event", eventType) - if eventType == watch.Bookmark || eventType == watch.Error { - itemAfterLogger.Info("don't transform bookmark and error events") - return &transformed - } - resource, ok := event.Object.(*unstructured.Unstructured) - if !ok { - errorMessage := "watch expected a resource of type *unstructured.Unstructured" - itemAfterLogger.Error(errors.New(errorMessage), errorMessage) - - transformed.Type = watch.Error - transformed.Object = &metav1.Status{ - Status: "Failure", - Reason: metav1.StatusReasonUnknown, - Message: errorMessage, - Code: 500, - } - return &transformed - } - if resource != nil { - itemAfterLogger = logging.WithObject(itemAfterLogger, resource) - } - itemAfterLogger.Info(startingMessage) - if transformedResource, err := tc.transformer.AfterRead(tc.resourceClient(resource), ctx, tc.resource, resource, &eventType); err != nil { - if kerrors.IsNotFound(err) { - itemAfterLogger.Info("transformation did return a NotFound error: let's skip the item") - return nil - } - itemAfterLogger.Error(err, errorMessage) - transformed.Type = watch.Error - statusError := &kerrors.StatusError{} - if errors.As(err, &statusError) { - transformed.Object = statusError.ErrStatus.DeepCopy() - } else { - transformed.Object = &metav1.Status{ - Status: "Failure", - Reason: metav1.StatusReasonUnknown, - Message: "Watch transformation failed", - Code: 500, - Details: &metav1.StatusDetails{ - Name: resource.GetName(), - Group: resource.GroupVersionKind().Group, - Kind: resource.GroupVersionKind().Kind, - Causes: []metav1.StatusCause{ - { - Type: metav1.CauseTypeUnexpectedServerResponse, - Message: err.Error(), - }, - }, - }, - } - } - } else { - transformed.Object = transformedResource - } - return &transformed - }) - return transformingWatcher, nil -} - -type transformingResourceClient struct { - transformingListerWatcherClient - delegate dynamic.ResourceInterface -} - -func getLogger(ctx context.Context) logr.Logger { - return klog.FromContext(ctx).WithName("transforming-client").V(7) -} - -const ( - before = "before" - after = "after" - errorMessage = "error during transformation" - startingMessage = "starting transformation" -) - -// Create implements dynamic.ResourceInterface. -// It transforms the input resource by calling the transformer BeforeWrite method -// before delegating the Create call to the underlying kubernetes client, -// and transforms back the result of the Create call by calling the transformer AfterRead method. -func (tc *transformingResourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { - var err error - logger := getLogger(ctx).WithValues("subresources", subresources).WithValues("action", "create") - if obj != nil { - logger = logging.WithObject(logger, obj) - } - beforeLogger := logger.WithValues("moment", before) - beforeLogger.Info(startingMessage) - obj, err = tc.transformer.BeforeWrite(tc.delegate, ctx, tc.resource, obj, subresources...) - if err != nil { - beforeLogger.Error(err, errorMessage) - return nil, err - } - result, err := tc.delegate.Create(ctx, obj, options, subresources...) - if err != nil { - return result, err - } - afterLogger := logger.WithValues("moment", after) - afterLogger.Info(startingMessage) - result, err = tc.transformer.AfterRead(tc.delegate, ctx, tc.resource, result, nil, subresources...) - if err != nil { - afterLogger.Error(err, errorMessage) - return result, err - } - return result, err -} - -// Update implements dynamic.ResourceInterface. -// It transforms the input resource by calling the transformer BeforeWrite method -// before delegating the Update call to the underlying kubernetes client, -// and transforms back the result of the Update call by calling the transformer AfterRead method. -func (tc *transformingResourceClient) Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { - var err error - logger := getLogger(ctx).WithValues("subresources", subresources).WithValues("action", "update") - if obj != nil { - logger = logging.WithObject(logger, obj) - } - beforeLogger := logger.WithValues("moment", before) - beforeLogger.Info(startingMessage) - obj, err = tc.transformer.BeforeWrite(tc.delegate, ctx, tc.resource, obj, subresources...) - if err != nil { - beforeLogger.Error(err, errorMessage) - return nil, err - } - result, err := tc.delegate.Update(ctx, obj, options, subresources...) - if err != nil { - return result, err - } - afterLogger := logger.WithValues("moment", after) - afterLogger.Info(startingMessage) - result, err = tc.transformer.AfterRead(tc.delegate, ctx, tc.resource, result, nil, subresources...) - if err != nil { - afterLogger.Error(err, errorMessage) - return result, err - } - return result, err -} - -func (tc *transformingResourceClient) Apply(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions, subresources ...string) (*unstructured.Unstructured, error) { - var err error - logger := getLogger(ctx).WithValues("subresources", subresources).WithValues("action", "apply") - if obj != nil { - logger = logging.WithObject(logger, obj) - } - beforeLogger := logger.WithValues("moment", before) - beforeLogger.Info(startingMessage) - obj, err = tc.transformer.BeforeWrite(tc.delegate, ctx, tc.resource, obj, subresources...) - if err != nil { - beforeLogger.Error(err, errorMessage) - return nil, err - } - result, err := tc.delegate.Apply(ctx, name, obj, options, subresources...) - if err != nil { - return result, err - } - afterLogger := logger.WithValues("moment", after) - afterLogger.Info(startingMessage) - result, err = tc.transformer.AfterRead(tc.delegate, ctx, tc.resource, result, nil, subresources...) - if err != nil { - afterLogger.Error(err, errorMessage) - return result, err - } - return result, err -} - -func (tc *transformingResourceClient) ApplyStatus(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions) (*unstructured.Unstructured, error) { - return tc.Apply(ctx, name, obj, options, "status") -} - -// Get implements dynamic.ResourceInterface. -// It delegates the Get call to the underlying kubernetes client, -// and transforms back the result of the Get call by calling the transformer AfterRead method. -func (tc *transformingResourceClient) Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { - var err error - result, err := tc.delegate.Get(ctx, name, options, subresources...) - if err != nil { - return result, err - } - afterLogger := getLogger(ctx).WithValues("name", name, "subresources", subresources).WithValues("action", "get").WithValues("moment", after) - afterLogger.Info(startingMessage) - result, err = tc.transformer.AfterRead(tc.delegate, ctx, tc.resource, result, nil, subresources...) - if err != nil { - afterLogger.Error(err, errorMessage) - return result, err - } - return result, err -} - -func (tc *transformingResourceClient) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error) { - return tc.Update(ctx, obj, options, "status") -} - -func (tc *transformingResourceClient) Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error { - return tc.delegate.Delete(ctx, name, options, subresources...) -} - -func (tc *transformingResourceClient) DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error { - return tc.delegate.DeleteCollection(ctx, options, listOptions) -} - -func (tc *transformingResourceClient) DeleteWithResult(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) (*unstructured.Unstructured, int, error) { - delegateDeleter, err := clientdynamic.NewDeleterWithResults(tc.delegate) - if err != nil { - return nil, 0, err - } - result, statusCode, err := delegateDeleter.DeleteWithResult(ctx, name, options, subresources...) - if err != nil { - return result, statusCode, err - } - afterLogger := getLogger(ctx).WithValues("name", name, "subresources", subresources).WithValues("action", "delete").WithValues("moment", after) - afterLogger.Info(startingMessage) - result, err = tc.transformer.AfterRead(tc.delegate, ctx, tc.resource, result, nil, subresources...) - if err != nil { - afterLogger.Error(err, errorMessage) - return result, statusCode, err - } - return result, statusCode, err -} - -func (tc *transformingResourceClient) DeleteCollectionWithResult(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) (*unstructured.UnstructuredList, error) { - delegateDeleter, err := clientdynamic.NewDeleterWithResults(tc.delegate) - if err != nil { - return nil, err - } - result, err := delegateDeleter.DeleteCollectionWithResult(ctx, options, listOptions) - if err != nil && result == nil { - return nil, err - } - - afterLogger := getLogger(ctx).WithValues("action", "deletecollection").WithValues("moment", after).WithValues("labelselector", listOptions.LabelSelector) - - transformedResult := result.DeepCopy() - transformedResult.Items = []unstructured.Unstructured{} - for _, item := range result.Items { - itemAfterLogger := logging.WithObject(afterLogger, &item) - itemAfterLogger.Info(startingMessage) - if transformed, err := tc.transformer.AfterRead(tc.resourceClient(&item), ctx, tc.resource, &item, nil); err != nil { - if kerrors.IsNotFound(err) { - itemAfterLogger.Info("transformation did return a NotFound error: let's skip the item") - continue - } - itemAfterLogger.Error(err, errorMessage) - return nil, err - } else { - transformedResult.Items = append(transformedResult.Items, *transformed) - } - } - return transformedResult, err -} - -func (tc *transformingResourceClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { - return nil, errors.New("not implemented") -} diff --git a/pkg/virtual/framework/transforming/transformer.go b/pkg/virtual/framework/transforming/transformer.go deleted file mode 100644 index 6ce2f02ae6b..00000000000 --- a/pkg/virtual/framework/transforming/transformer.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2022 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 transforming - -import ( - "context" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/dynamic" - - kcpdynamic "github.com/kcp-dev/client-go/dynamic" -) - -// ResourceTransformer define transformations that should be applied to a resource -// before and after a client submits a resource request to a kubernetes client. -type ResourceTransformer interface { - // BeforeWrite is called before a resource is created or updated. The resource effectively created or updated - // sent to the kubernetes client is the transformed resource returned as result of this method call. - BeforeWrite(client dynamic.ResourceInterface, ctx context.Context, gvr schema.GroupVersionResource, resource *unstructured.Unstructured, subresources ...string) (transformed *unstructured.Unstructured, err error) - - // AfterRead is called after a resource is returned from a kubernetes client call. - // This includes Get and List calls, but also Create, and Update (since they return the created or updated resource). - // It is also called for every resource associated to Watch Events in a Watch call. - // In all those cases, the resource effectively read is the transformed resource returned as result of this method call. - AfterRead(client dynamic.ResourceInterface, ctx context.Context, gvr schema.GroupVersionResource, resource *unstructured.Unstructured, eventType *watch.EventType, subresources ...string) (transformed *unstructured.Unstructured, err error) -} - -// WithResourceTransformer returns a ClusterInterface client whose kubernetes clients are wired with a ResourceTransformer. -func WithResourceTransformer(clusterClient kcpdynamic.ClusterInterface, transformer ResourceTransformer) kcpdynamic.ClusterInterface { - return &transformingDynamicClusterClient{ - transformer: transformer, - delegate: clusterClient, - } -} diff --git a/pkg/virtual/framework/transforming/transformer_test.go b/pkg/virtual/framework/transforming/transformer_test.go deleted file mode 100644 index f9c9526eaa8..00000000000 --- a/pkg/virtual/framework/transforming/transformer_test.go +++ /dev/null @@ -1,1389 +0,0 @@ -/* -Copyright 2022 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 transforming - -import ( - "context" - "errors" - "strings" - "testing" - "time" - - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/stretchr/testify/require" - - "k8s.io/apimachinery/pkg/api/equality" - kerrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/apimachinery/pkg/watch" - "k8s.io/client-go/dynamic" - "k8s.io/client-go/dynamic/fake" - clienttesting "k8s.io/client-go/testing" - - kcpdynamic "github.com/kcp-dev/client-go/dynamic" - "github.com/kcp-dev/logicalcluster/v3" - - clientdynamic "github.com/kcp-dev/kcp/pkg/virtual/framework/client/dynamic" -) - -type clustered interface { - ClusterName() string -} - -type mockedClusterClient struct { - client *fake.FakeDynamicClient - lclusterRecorder func(lcluster string) -} - -func (c *mockedClusterClient) Resource(resource schema.GroupVersionResource) kcpdynamic.ResourceClusterInterface { - return &mockedResourceClusterClient{ - resourceClient: resourceClient{ - client: c.client, - resource: resource, - resourceInterface: c.client.Resource(resource), - lclusterRecorder: c.lclusterRecorder, - }, - } -} - -func (c *mockedClusterClient) Cluster(cluster logicalcluster.Path) dynamic.Interface { - return &dynamicClient{ - client: c.client, - lcluster: cluster, - lclusterRecorder: c.lclusterRecorder, - } -} - -type mockedResourceClusterClient struct { - resourceClient -} - -func (c *mockedResourceClusterClient) Cluster(lcluster logicalcluster.Path) dynamic.NamespaceableResourceInterface { - return &namespaceableResourceClient{ - resourceClient: resourceClient{ - resourceInterface: c.client.Resource(c.resource), - client: c.client, - resource: c.resource, - lcluster: lcluster, - lclusterRecorder: c.lclusterRecorder, - }, - } -} - -func (c *mockedResourceClusterClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - return c.resourceClient.List(ctx, opts) -} - -func (c *mockedResourceClusterClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - return c.resourceClient.Watch(ctx, opts) -} - -type dynamicClient struct { - client *fake.FakeDynamicClient - lcluster logicalcluster.Path - lclusterRecorder func(lcluster string) -} - -func (c *dynamicClient) ClusterName() string { return c.lcluster.String() } - -func (c *dynamicClient) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface { - return &namespaceableResourceClient{ - resourceClient: resourceClient{ - resourceInterface: c.client.Resource(resource), - client: c.client, - lcluster: c.lcluster, - resource: resource, - lclusterRecorder: c.lclusterRecorder, - }, - } -} - -type namespaceableResourceClient struct { - resourceClient -} - -func (c *namespaceableResourceClient) Apply(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions, subresources ...string) (*unstructured.Unstructured, error) { - return c.resourceClient.Apply(ctx, name, obj, options, subresources...) -} - -func (c *namespaceableResourceClient) ApplyStatus(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions) (*unstructured.Unstructured, error) { - return c.resourceClient.ApplyStatus(ctx, name, obj, options) -} - -var _ dynamic.NamespaceableResourceInterface = (*namespaceableResourceClient)(nil) - -func (c *namespaceableResourceClient) ClusterName() string { return c.lcluster.String() } - -func (c *namespaceableResourceClient) Namespace(namespace string) dynamic.ResourceInterface { - return &resourceClient{ - resourceInterface: c.client.Resource(c.resource).Namespace(namespace), - client: c.client, - lcluster: c.lcluster, - resource: c.resource, - namespace: namespace, - lclusterRecorder: c.lclusterRecorder, - } -} - -type resourceClient struct { - resourceInterface dynamic.ResourceInterface - client *fake.FakeDynamicClient - lcluster logicalcluster.Path - resource schema.GroupVersionResource - namespace string - lclusterRecorder func(lcluster string) -} - -var _ dynamic.ResourceInterface = (*resourceClient)(nil) - -func (c *resourceClient) ClusterName() string { return c.lcluster.String() } - -func (c *resourceClient) RawDelete(ctx context.Context, name string, opts metav1.DeleteOptions, subresources ...string) ([]byte, int, error) { - obj, _ := c.client.Tracker().Get(c.resource, c.namespace, name) - err := c.Delete(ctx, name, opts, subresources...) - bytes, _ := runtime.Encode(unstructured.UnstructuredJSONScheme, obj) - return bytes, 0, err -} - -func titleASCII(s string) string { - if s == "" { - return "" - } - return strings.ToUpper(s[0:1]) + s[1:] -} - -func (c *resourceClient) RawDeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOptions metav1.ListOptions) ([]byte, int, error) { - gvk := c.resource.GroupVersion().WithKind(strings.TrimRight(titleASCII(c.resource.Resource), "s")) - objs, _ := c.client.Tracker().List(c.resource, gvk, c.namespace) - list := objs.(*unstructured.UnstructuredList) - list.SetGroupVersionKind(schema.GroupVersionKind{Group: gvk.Group, Version: gvk.Version, Kind: gvk.Kind + "List"}) - list.SetResourceVersion("") - err := c.DeleteCollection(ctx, opts, listOptions) - bytes, _ := runtime.Encode(unstructured.UnstructuredJSONScheme, list) - return bytes, 0, err -} - -func (c *resourceClient) Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.Create(ctx, obj, options, subresources...) -} -func (c *resourceClient) Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.Update(ctx, obj, options, subresources...) -} -func (c *resourceClient) UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.UpdateStatus(ctx, obj, options) -} -func (c *resourceClient) Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) error { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.Delete(ctx, name, options, subresources...) -} -func (c *resourceClient) DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) error { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.DeleteCollection(ctx, options, listOptions) -} -func (c *resourceClient) Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.Get(ctx, name, options, subresources...) -} -func (c *resourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.List(ctx, opts) -} -func (c *resourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.Watch(ctx, opts) -} -func (c *resourceClient) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.Patch(ctx, name, pt, data, options, subresources...) -} -func (c *resourceClient) Apply(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions, subresources ...string) (*unstructured.Unstructured, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.Apply(ctx, name, obj, options, subresources...) -} -func (c *resourceClient) ApplyStatus(ctx context.Context, name string, obj *unstructured.Unstructured, options metav1.ApplyOptions) (*unstructured.Unstructured, error) { - c.lclusterRecorder(c.lcluster.String()) - return c.resourceInterface.ApplyStatus(ctx, name, obj, options) -} - -type transformerCall struct { - Moment string - GVR schema.GroupVersionResource - Resource *unstructured.Unstructured - SubResources []string - LCluster string - EventType string -} - -type resourceTransformer struct { - after func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) - before func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) - calls []transformerCall -} - -func (rt *resourceTransformer) BeforeWrite(client dynamic.ResourceInterface, ctx context.Context, gvr schema.GroupVersionResource, resource *unstructured.Unstructured, subresources ...string) (transformed *unstructured.Unstructured, err error) { - lcluster := client.(clustered).ClusterName() - rt.calls = append(rt.calls, transformerCall{ - Moment: "before", - GVR: gvr, - Resource: resource, - SubResources: subresources, - LCluster: lcluster, - }) - return rt.before(resource) -} - -func (rt *resourceTransformer) AfterRead(client dynamic.ResourceInterface, ctx context.Context, gvr schema.GroupVersionResource, resource *unstructured.Unstructured, eventType *watch.EventType, subresources ...string) (transformed *unstructured.Unstructured, err error) { - lcluster := client.(clustered).ClusterName() - var eventTypeStr string - if eventType != nil { - eventTypeStr = string(*eventType) - } - rt.calls = append(rt.calls, transformerCall{ - Moment: "after", - GVR: gvr, - Resource: resource, - SubResources: subresources, - LCluster: lcluster, - EventType: eventTypeStr, - }) - return rt.after(resource) -} - -func gvr(group, version, resource string) schema.GroupVersionResource { - return schema.GroupVersionResource{ - Group: group, - Version: version, - Resource: resource, - } -} - -type resourceBuilder func() *unstructured.Unstructured - -func (rb resourceBuilder) ns(namespace string) resourceBuilder { - return func() *unstructured.Unstructured { - r := rb() - r.Object["metadata"].(map[string]interface{})["namespace"] = namespace - return r - } -} - -func (rb resourceBuilder) cluster(cluster string) resourceBuilder { - return func() *unstructured.Unstructured { - r := rb() - metadata := r.Object["metadata"].(map[string]interface{}) - if _, exists := metadata["annotations"]; !exists { - metadata["annotations"] = map[string]interface{}{} - } - metadata["annotations"].(map[string]interface{})["kcp.io/cluster"] = cluster - return r - } -} - -func (rb resourceBuilder) field(name, value string) resourceBuilder { - return func() *unstructured.Unstructured { - r := rb() - r.Object[name] = value - return r - } -} - -func resource(apiVersion, kind, name string) resourceBuilder { - return func() *unstructured.Unstructured { - return &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": apiVersion, - "kind": kind, - "metadata": map[string]interface{}{ - "name": name, - }, - }, - } - } -} - -func TestResourceTransformer(t *testing.T) { - testCases := []struct { - name string - lcluster string - gvr schema.GroupVersionResource - availableResources []runtime.Object - action func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) - after func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) - before func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) - expectedResult interface{} - checkResult func(t *testing.T, watchTester *watch.FakeWatcher, result interface{}) - expectedError string - expectedClientAction clienttesting.Action - expectedClientActionCluster string - expectedTransformerCalls []transformerCall - }{ - { - name: "create - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Cluster(lcluster).Resource(gvr).Create(ctx, resource("group/version", "Resource", "aThing")(), metav1.CreateOptions{}) - }, - before: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "before") - return result, nil - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.CreateActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "create", - Resource: gvr("group", "version", "resources"), - }, - Object: resource("group/version", "Resource", "aThing").field("before", "added")(), - }, - expectedClientActionCluster: "cluster1", - expectedResult: resource("group/version", "Resource", "aThing").field("before", "added").field("after", "added")(), - expectedTransformerCalls: []transformerCall{ - { - Moment: "before", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").field("before", "added")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "create - already exists", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Create(ctx, resource("group/version", "Resource", "aThing")(), metav1.CreateOptions{}) - }, - before: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "before") - return result, nil - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.CreateActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "create", - Resource: gvr("group", "version", "resources"), - }, - Object: resource("group/version", "Resource", "aThing").field("before", "added")(), - }, - expectedClientActionCluster: "cluster1", - expectedError: `resources.group "aThing" already exists`, - expectedTransformerCalls: []transformerCall{ - { - Moment: "before", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "update - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Update(ctx, resource("group/version", "Resource", "aThing")(), metav1.UpdateOptions{}) - }, - before: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "before") - return result, nil - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.UpdateActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "update", - Resource: schema.GroupVersionResource{ - Group: "group", Version: "version", Resource: "resources", - }, - }, - Object: resource("group/version", "Resource", "aThing").field("before", "added")(), - }, - expectedClientActionCluster: "cluster1", - expectedResult: resource("group/version", "Resource", "aThing").field("before", "added").field("after", "added")(), - expectedTransformerCalls: []transformerCall{ - { - Moment: "before", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").field("before", "added")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "update status - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).UpdateStatus(ctx, resource("group/version", "Resource", "aThing")(), metav1.UpdateOptions{}) - }, - before: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "before") - return result, nil - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.UpdateActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "update", - Resource: schema.GroupVersionResource{ - Group: "group", Version: "version", Resource: "resources", - }, - Subresource: "status", - }, - Object: resource("group/version", "Resource", "aThing").field("before", "added")(), - }, - expectedClientActionCluster: "cluster1", - expectedResult: resource("group/version", "Resource", "aThing").field("before", "added").field("after", "added")(), - expectedTransformerCalls: []transformerCall{ - { - Moment: "before", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - SubResources: []string{"status"}, - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").field("before", "added")(), - LCluster: "cluster1", - SubResources: []string{"status"}, - }, - }, - }, - { - name: "update - not found", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Update(ctx, resource("group/version", "Resource", "aThing")(), metav1.UpdateOptions{}) - }, - before: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "before") - return result, nil - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.UpdateActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "update", - Resource: gvr("group", "version", "resources"), - }, - Object: resource("group/version", "Resource", "aThing").field("before", "added")(), - }, - expectedClientActionCluster: "cluster1", - expectedError: `resources.group "aThing" not found`, - expectedTransformerCalls: []transformerCall{ - { - Moment: "before", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "get - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Get(ctx, "aThing", metav1.GetOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.GetActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "get", - Resource: gvr("group", "version", "resources"), - }, - Name: "aThing", - }, - expectedClientActionCluster: "cluster1", - expectedResult: resource("group/version", "Resource", "aThing").field("after", "added")(), - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "get - not found", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Get(ctx, "aThing", metav1.GetOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.GetActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "get", - Resource: gvr("group", "version", "resources"), - }, - Name: "aThing", - }, - expectedClientActionCluster: "cluster1", - expectedError: `resources.group "aThing" not found`, - }, - { - name: "list cross cluster - success", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing").cluster("cluster1")(), - resource("group/version", "Resource", "aThingMore").cluster("cluster2")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).List(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.ListActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "list", - Resource: gvr("group", "version", "resources"), - }, - Kind: schema.GroupVersionKind{Group: "group", Version: "version", Kind: "Resource"}, - ListRestrictions: listRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "", - expectedResult: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "apiVersion": "group/version", - "kind": "ResourceList", - "metadata": map[string]interface{}{"resourceVersion": "", "continue": ""}, - }, - Items: []unstructured.Unstructured{ - *resource("group/version", "Resource", "aThing").cluster("cluster1").field("after", "added aThing")(), - *resource("group/version", "Resource", "aThingMore").cluster("cluster2").field("after", "added aThingMore")(), - }, - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").cluster("cluster1")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore").cluster("cluster2")(), - LCluster: "cluster2", - }, - }, - }, - { - name: "list cross cluster - success with filtering", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing").cluster("cluster1")(), - resource("group/version", "Resource", "aThingMore").cluster("cluster2")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).List(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - if resource.GetName() == "aThing" { - return nil, kerrors.NewNotFound(schema.GroupResource{Group: "group", Resource: "resources"}, "aThing") - } - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.ListActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "list", - Resource: gvr("group", "version", "resources"), - }, - Kind: schema.GroupVersionKind{Group: "group", Version: "version", Kind: "Resource"}, - ListRestrictions: listRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "", - expectedResult: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "apiVersion": "group/version", - "kind": "ResourceList", - "metadata": map[string]interface{}{"resourceVersion": "", "continue": ""}, - }, - Items: []unstructured.Unstructured{ - *resource("group/version", "Resource", "aThingMore").cluster("cluster2").field("after", "added aThingMore")(), - }, - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").cluster("cluster1")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore").cluster("cluster2")(), - LCluster: "cluster2", - }, - }, - }, - { - name: "list in cluster - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - resource("group/version", "Resource", "aThingMore")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).List(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.ListActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "list", - Resource: gvr("group", "version", "resources"), - }, - Kind: schema.GroupVersionKind{Group: "group", Version: "version", Kind: "Resource"}, - ListRestrictions: listRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "cluster1", - expectedResult: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "apiVersion": "group/version", - "kind": "ResourceList", - "metadata": map[string]interface{}{"resourceVersion": "", "continue": ""}, - }, - Items: []unstructured.Unstructured{ - *resource("group/version", "Resource", "aThing").field("after", "added aThing")(), - *resource("group/version", "Resource", "aThingMore").field("after", "added aThingMore")(), - }, - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "list in cluster - success - old way", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - resource("group/version", "Resource", "aThingMore")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Cluster(lcluster).Resource(gvr).List(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.ListActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "list", - Resource: gvr("group", "version", "resources"), - }, - Kind: schema.GroupVersionKind{Group: "group", Version: "version", Kind: "Resource"}, - ListRestrictions: listRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "cluster1", - expectedResult: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "apiVersion": "group/version", - "kind": "ResourceList", - "metadata": map[string]interface{}{"resourceVersion": "", "continue": ""}, - }, - Items: []unstructured.Unstructured{ - *resource("group/version", "Resource", "aThing").field("after", "added aThing")(), - *resource("group/version", "Resource", "aThingMore").field("after", "added aThingMore")(), - }, - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "list in namespace - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing").ns("aNamespace")(), - resource("group/version", "Resource", "aThingMore").ns("aNamespace")(), - resource("group/version", "Resource", "aThingIgnored").ns("aDistinctNamespace")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Namespace("aNamespace").List(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.ListActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "list", - Resource: gvr("group", "version", "resources"), - Namespace: "aNamespace", - }, - Kind: schema.GroupVersionKind{Group: "group", Version: "version", Kind: "Resource"}, - ListRestrictions: listRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "cluster1", - expectedResult: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "apiVersion": "group/version", - "kind": "ResourceList", - "metadata": map[string]interface{}{"resourceVersion": "", "continue": ""}, - }, - Items: []unstructured.Unstructured{ - *resource("group/version", "Resource", "aThing").ns("aNamespace").field("after", "added aThing")(), - *resource("group/version", "Resource", "aThingMore").ns("aNamespace").field("after", "added aThingMore")(), - }, - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").ns("aNamespace")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore").ns("aNamespace")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "delete - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return nil, transformingClient.Resource(gvr).Cluster(lcluster).Delete(context.Background(), "aThing", metav1.DeleteOptions{}, "") - }, - expectedClientAction: clienttesting.DeleteActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "delete", - Resource: gvr("group", "version", "resources"), - }, - Name: "aThing", - }, - expectedClientActionCluster: "cluster1", - }, - { - name: "delete - notfound", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return nil, transformingClient.Resource(gvr).Cluster(lcluster).Namespace("aNamespace").Delete(ctx, "aThing", metav1.DeleteOptions{}) - }, - expectedClientAction: clienttesting.DeleteActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "delete", - Resource: gvr("group", "version", "resources"), - Namespace: "aNamespace", - }, - Name: "aThing", - }, - expectedClientActionCluster: "cluster1", - expectedError: `resources.group "aThing" not found`, - }, - { - name: "delete with result - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - deleterWithResult, _ := transformingClient.Resource(gvr).Cluster(lcluster).(clientdynamic.DeleterWithResults) - deleteresult, _, err := deleterWithResult.DeleteWithResult(context.Background(), "aThing", metav1.DeleteOptions{}) - return deleteresult, err - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added", "after") - return result, nil - }, - expectedClientAction: clienttesting.DeleteActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "delete", - Resource: gvr("group", "version", "resources"), - }, - Name: "aThing", - }, - expectedClientActionCluster: "cluster1", - expectedResult: resource("group/version", "Resource", "aThing").field("after", "added")(), - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "delete with result - notfound", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - deleterWithResult, _ := transformingClient.Resource(gvr).Cluster(lcluster).Namespace("aNamespace").(clientdynamic.DeleterWithResults) - deleteresult, _, err := deleterWithResult.DeleteWithResult(context.Background(), "aThing", metav1.DeleteOptions{}, "") - return deleteresult, err - }, - expectedClientAction: clienttesting.DeleteActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "delete", - Resource: gvr("group", "version", "resources"), - Namespace: "aNamespace", - }, - Name: "aThing", - }, - expectedClientActionCluster: "cluster1", - expectedError: `resources.group "aThing" not found`, - }, - { - name: "deletecollection - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - resource("group/version", "Resource", "aThingMore")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return nil, transformingClient.Resource(gvr).Cluster(lcluster).DeleteCollection(context.Background(), metav1.DeleteOptions{}, metav1.ListOptions{}) - }, - expectedClientAction: clienttesting.DeleteCollectionActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "delete-collection", - Resource: gvr("group", "version", "resources"), - }, - ListRestrictions: listRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "cluster1", - }, - { - name: "deletecollection with result - success", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - resource("group/version", "Resource", "aThing")(), - resource("group/version", "Resource", "aThingMore")(), - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - deleterWithResult, _ := transformingClient.Resource(gvr).Cluster(lcluster).(clientdynamic.DeleterWithResults) - deleteresult, err := deleterWithResult.DeleteCollectionWithResult(context.Background(), metav1.DeleteOptions{}, metav1.ListOptions{}) - return deleteresult, err - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.DeleteCollectionActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "delete-collection", - Resource: gvr("group", "version", "resources"), - }, - ListRestrictions: listRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "cluster1", - expectedResult: &unstructured.UnstructuredList{ - Object: map[string]interface{}{ - "apiVersion": "group/version", - "kind": "ResourceList", - "metadata": map[string]interface{}{"resourceVersion": ""}, - }, - Items: []unstructured.Unstructured{ - *resource("group/version", "Resource", "aThing").field("after", "added aThing")(), - *resource("group/version", "Resource", "aThingMore").field("after", "added aThingMore")(), - }, - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore")(), - LCluster: "cluster1", - }, - }, - }, - { - name: "patch - not implemented", - gvr: gvr("group", "version", "resources"), - availableResources: []runtime.Object{ - &unstructured.Unstructured{ - Object: map[string]interface{}{ - "apiVersion": "group/version", - "kind": "Resource", - "metadata": map[string]interface{}{ - "name": "aThing", - }, - }, - }, - }, - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Patch(context.Background(), "aThing", types.JSONPatchType, []byte(""), metav1.PatchOptions{}) - }, - expectedClientAction: nil, - expectedError: "not implemented", - }, - { - name: "watch cross cluster - success", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Watch(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.WatchActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "watch", - Resource: gvr("group", "version", "resources"), - }, - WatchRestrictions: watchRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "", - checkResult: func(t *testing.T, watchTester *watch.FakeWatcher, result interface{}) { - t.Helper() - - watcher, ok := result.(watch.Interface) - if !ok { - require.Fail(t, "result of Watch should be a watch.Interface") - } - - watchedError := &metav1.Status{ - Status: "Failure", - Message: "message", - } - checkWatchEvents(t, - watcher, - func() { - watchTester.Add(resource("group/version", "Resource", "aThing").cluster("cluster1")()) - watchTester.Add(resource("group/version", "Resource", "aThingMore").cluster("cluster2")()) - watchTester.Modify(resource("group/version", "Resource", "aThing").cluster("cluster1")()) - watchTester.Delete(resource("group/version", "Resource", "aThingMore").cluster("cluster2")()) - watchTester.Error(watchedError) - }, - []watch.Event{ - {Type: watch.Added, Object: resource("group/version", "Resource", "aThing").cluster("cluster1").field("after", "added aThing")()}, - {Type: watch.Added, Object: resource("group/version", "Resource", "aThingMore").cluster("cluster2").field("after", "added aThingMore")()}, - {Type: watch.Modified, Object: resource("group/version", "Resource", "aThing").cluster("cluster1").field("after", "added aThing")()}, - {Type: watch.Deleted, Object: resource("group/version", "Resource", "aThingMore").cluster("cluster2").field("after", "added aThingMore")()}, - {Type: watch.Error, Object: watchedError}, - }) - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").cluster("cluster1")(), - LCluster: "cluster1", - EventType: "ADDED", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore").cluster("cluster2")(), - LCluster: "cluster2", - EventType: "ADDED", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing").cluster("cluster1")(), - LCluster: "cluster1", - EventType: "MODIFIED", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore").cluster("cluster2")(), - LCluster: "cluster2", - EventType: "DELETED", - }, - }, - }, - { - name: "watch in cluster - success with filtering", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Watch(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - if resource.GetName() == "aThing" { - return nil, kerrors.NewNotFound(schema.GroupResource{Group: "group", Resource: "resources"}, "aThing") - } - result := resource.DeepCopy() - _ = unstructured.SetNestedField(result.Object, "added "+result.GetName(), "after") - return result, nil - }, - expectedClientAction: clienttesting.WatchActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "watch", - Resource: gvr("group", "version", "resources"), - }, - WatchRestrictions: watchRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "cluster1", - checkResult: func(t *testing.T, watchTester *watch.FakeWatcher, result interface{}) { - t.Helper() - - watcher, ok := result.(watch.Interface) - if !ok { - require.Fail(t, "result of Watch should be a watch.Interface") - } - - watchedError := &metav1.Status{ - Status: "Failure", - Message: "message", - } - checkWatchEvents(t, - watcher, - func() { - watchTester.Add(resource("group/version", "Resource", "aThing")()) - watchTester.Add(resource("group/version", "Resource", "aThingMore")()) - watchTester.Modify(resource("group/version", "Resource", "aThing")()) - watchTester.Delete(resource("group/version", "Resource", "aThingMore")()) - watchTester.Error(watchedError) - }, - []watch.Event{ - {Type: watch.Added, Object: resource("group/version", "Resource", "aThingMore").field("after", "added aThingMore")()}, - {Type: watch.Deleted, Object: resource("group/version", "Resource", "aThingMore").field("after", "added aThingMore")()}, - {Type: watch.Error, Object: watchedError}, - }) - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - EventType: "ADDED", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore")(), - LCluster: "cluster1", - EventType: "ADDED", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - EventType: "MODIFIED", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore")(), - LCluster: "cluster1", - EventType: "DELETED", - }, - }, - }, - { - name: "watch in cluster - failure in transformer", - lcluster: "cluster1", - gvr: gvr("group", "version", "resources"), - action: func(ctx context.Context, transformingClient kcpdynamic.ClusterInterface, lcluster logicalcluster.Path, gvr schema.GroupVersionResource) (result interface{}, err error) { - return transformingClient.Resource(gvr).Cluster(lcluster).Watch(ctx, metav1.ListOptions{}) - }, - after: func(resource *unstructured.Unstructured) (*unstructured.Unstructured, error) { - if resource.GetName() == "aThing" { - return nil, kerrors.NewForbidden(schema.GroupResource{Group: "group", Resource: "resources"}, "aThing", nil) - } - return nil, errors.New("raw error") - }, - expectedClientAction: clienttesting.WatchActionImpl{ - ActionImpl: clienttesting.ActionImpl{ - Verb: "watch", - Resource: gvr("group", "version", "resources"), - }, - WatchRestrictions: watchRestrictionsFromListOptions(metav1.ListOptions{}), - }, - expectedClientActionCluster: "cluster1", - checkResult: func(t *testing.T, watchTester *watch.FakeWatcher, result interface{}) { - t.Helper() - - watcher, ok := result.(watch.Interface) - if !ok { - require.Fail(t, "result of Watch should be a watch.Interface") - } - - checkWatchEvents(t, - watcher, - func() { - watchTester.Add(resource("group/version", "Resource", "aThing")()) - watchTester.Add(resource("group/version", "Resource", "aThingMore")()) - }, - []watch.Event{ - {Type: watch.Error, Object: &metav1.Status{ - Status: "Failure", - Message: `resources.group "aThing" is forbidden: `, - Reason: "Forbidden", - Details: &metav1.StatusDetails{ - Name: "aThing", - Group: "group", - Kind: "resources", - }, - Code: 403, - }}, - {Type: watch.Error, Object: &metav1.Status{ - Status: "Failure", - Message: `Watch transformation failed`, - Details: &metav1.StatusDetails{ - Name: "aThingMore", - Group: "group", - Kind: "Resource", - Causes: []metav1.StatusCause{ - { - Type: metav1.CauseTypeUnexpectedServerResponse, - Message: "raw error", - }, - }, - }, - Code: 500, - }}, - }) - }, - expectedTransformerCalls: []transformerCall{ - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThing")(), - LCluster: "cluster1", - EventType: "ADDED", - }, - { - Moment: "after", - GVR: gvr("group", "version", "resources"), - Resource: resource("group/version", "Resource", "aThingMore")(), - LCluster: "cluster1", - EventType: "ADDED", - }, - }, - }, - } - - for _, test := range testCases { - t.Run(test.name, func(t *testing.T) { - fakeClient := fake.NewSimpleDynamicClient(runtime.NewScheme(), test.availableResources...) - var lclustersRequestedInActions []string - clusterClient := &mockedClusterClient{ - client: fakeClient, - lclusterRecorder: func(lcluster string) { - lclustersRequestedInActions = append(lclustersRequestedInActions, lcluster) - }, - } - rt := &resourceTransformer{ - before: test.before, - after: test.after, - } - fakeWatcher := watch.NewFake() - defer fakeWatcher.Stop() - fakeClient.PrependWatchReactor("resources", clienttesting.DefaultWatchReactor(fakeWatcher, nil)) - - transformingClient := WithResourceTransformer(clusterClient, rt) - ctx := context.Background() - - result, err := test.action(ctx, transformingClient, logicalcluster.NewPath(test.lcluster), test.gvr) - - if test.expectedError != "" { - require.EqualError(t, err, test.expectedError, "error is wrong") - } else { - require.NoError(t, err, "error is wrong") - } - if test.checkResult != nil { - test.checkResult(t, fakeWatcher, result) - } else if test.expectedResult != nil { - require.Empty(t, cmp.Diff(test.expectedResult, result, cmpopts.SortSlices(sortUnstructured)), "result is wrong") - } else { - require.Nil(t, result, "result is wrong") - } - actions := fakeClient.Actions() - if len(actions) > 1 { - require.Fail(t, "client action number should not be > 1") - } - var action clienttesting.Action - if len(actions) == 1 { - action = actions[0] - } - require.Empty(t, cmp.Diff(test.expectedClientAction, action), "client action is wrong") - - var lclusterRequestedInAction string - if len(lclustersRequestedInActions) > 0 { - lclusterRequestedInAction = lclustersRequestedInActions[0] - } - require.Equal(t, test.expectedClientActionCluster, lclusterRequestedInAction, "client lcluster is wrong") - require.Empty(t, cmp.Diff(test.expectedTransformerCalls, rt.calls), "transformer calls are wrong") - }) - } -} - -func sortUnstructured(a *unstructured.Unstructured, b *unstructured.Unstructured) bool { - return a.GetName() > b.GetName() -} - -func listRestrictionsFromListOptions(options metav1.ListOptions) clienttesting.ListRestrictions { - labelSelector, fieldSelector, _ := clienttesting.ExtractFromListOptions(options) - return clienttesting.ListRestrictions{ - Labels: labelSelector, - Fields: fieldSelector, - } -} - -func watchRestrictionsFromListOptions(options metav1.ListOptions) clienttesting.WatchRestrictions { - labelSelector, fieldSelector, _ := clienttesting.ExtractFromListOptions(options) - return clienttesting.WatchRestrictions{ - Labels: labelSelector, - Fields: fieldSelector, - } -} - -func checkWatchEvents(t *testing.T, watcher watch.Interface, addEvents func(), expectedEvents []watch.Event) { - t.Helper() - - watchingStarted := make(chan bool, 1) - go func() { - <-watchingStarted - addEvents() - }() - - watchingStarted <- true - watcherChan := watcher.ResultChan() - var event watch.Event - - for _, expectedEvent := range expectedEvents { - select { - case event = <-watcherChan: - case <-time.After(wait.ForeverTestTimeout): - require.Fail(t, "Watch event not received") - } - require.Equal(t, expectedEvent.Type, event.Type, "Event type is wrong") - require.True(t, equality.Semantic.DeepEqual(expectedEvent.Object, event.Object), cmp.Diff(expectedEvent.Object, event.Object)) - } -} diff --git a/pkg/virtual/framework/transforming/watcher.go b/pkg/virtual/framework/transforming/watcher.go deleted file mode 100644 index cacb3e46668..00000000000 --- a/pkg/virtual/framework/transforming/watcher.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -Copyright 2022 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 transforming - -import ( - "k8s.io/apimachinery/pkg/watch" -) - -// EventTransformer is a simple interface that transforms a watch event. -type EventTransformer func(event watch.Event) (transformed *watch.Event) - -// NewTransformingWatcher returns a watcher based on the input watcher, but which will apply -// the EventTransformer to each event before delivering it. -func NewTransformingWatcher(watcher watch.Interface, eventTransformer EventTransformer) *transformingWatcher { - tw := &transformingWatcher{ - source: watcher, - transformedCh: make(chan watch.Event), - eventTransformer: eventTransformer, - } - tw.start() - return tw -} - -type transformingWatcher struct { - source watch.Interface - transformedCh chan watch.Event - eventTransformer EventTransformer -} - -func (w *transformingWatcher) start() { - go func() { - for { - if evt, more := <-w.source.ResultChan(); more { - transformedEvent := w.eventTransformer(evt) - if transformedEvent != nil { - w.transformedCh <- *transformedEvent - } - } else { - close(w.transformedCh) - return - } - } - }() -} - -// Stop implements Interface. -func (w *transformingWatcher) Stop() { - w.source.Stop() -} - -// ResultChan implements Interface. -func (w *transformingWatcher) ResultChan() <-chan watch.Event { - return w.transformedCh -} diff --git a/staging/src/github.com/kcp-dev/apimachinery/go.mod b/staging/src/github.com/kcp-dev/apimachinery/go.mod index 410180a729d..aeff057330c 100644 --- a/staging/src/github.com/kcp-dev/apimachinery/go.mod +++ b/staging/src/github.com/kcp-dev/apimachinery/go.mod @@ -6,25 +6,26 @@ require ( github.com/google/go-cmp v0.7.0 github.com/kcp-dev/logicalcluster/v3 v3.0.4 github.com/stretchr/testify v1.10.0 - k8s.io/api v0.33.5 - k8s.io/apimachinery v0.33.5 - k8s.io/client-go v0.33.5 + k8s.io/api v0.34.2 + k8s.io/apimachinery v0.34.2 + k8s.io/client-go v0.34.2 k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 ) require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kr/text v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/x448/float16 v0.8.4 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect golang.org/x/net v0.38.0 // indirect golang.org/x/oauth2 v0.27.0 // indirect golang.org/x/sys v0.31.0 // indirect @@ -33,8 +34,8 @@ require ( golang.org/x/time v0.9.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) diff --git a/staging/src/github.com/kcp-dev/apimachinery/go.sum b/staging/src/github.com/kcp-dev/apimachinery/go.sum index 9fdba309b1b..ec318852f1d 100644 --- a/staging/src/github.com/kcp-dev/apimachinery/go.sum +++ b/staging/src/github.com/kcp-dev/apimachinery/go.sum @@ -3,10 +3,10 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= @@ -17,9 +17,8 @@ github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+Gr github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= 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= @@ -42,8 +41,9 @@ github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -53,8 +53,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= -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/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/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= @@ -67,6 +67,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -115,24 +119,23 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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.33.5 h1:YR+uhYj05jdRpcksv8kjSliW+v9hwXxn6Cv10aR8Juw= -k8s.io/api v0.33.5/go.mod h1:2gzShdwXKT5yPGiqrTrn/U/nLZ7ZyT4WuAj3XGDVgVs= -k8s.io/apimachinery v0.33.5 h1:NiT64hln4TQXeYR18/ES39OrNsjGz8NguxsBgp+6QIo= -k8s.io/apimachinery v0.33.5/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/client-go v0.33.5 h1:I8BdmQGxInpkMEnJvV6iG7dqzP3JRlpZZlib3OMFc3o= -k8s.io/client-go v0.33.5/go.mod h1:W8PQP4MxbM4ypgagVE65mUUqK1/ByQkSALF9tzuQ6u0= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= 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-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/staging/src/github.com/kcp-dev/apimachinery/third_party/informers/shared_informer.go b/staging/src/github.com/kcp-dev/apimachinery/third_party/informers/shared_informer.go index bbc61c16f2b..d1d28f32337 100644 --- a/staging/src/github.com/kcp-dev/apimachinery/third_party/informers/shared_informer.go +++ b/staging/src/github.com/kcp-dev/apimachinery/third_party/informers/shared_informer.go @@ -101,7 +101,9 @@ func NewSharedIndexInformerWithOptions(lw cache.ListerWatcher, exampleObject run } } -// SharedIndexInformerOptions configures a sharedIndexInformer. +// InformerSynced is a function that can be used to determine if an informer has synced. This is useful for determining if caches have synced. +type InformerSynced func() bool + const ( // syncedPollPeriod controls how often you look at the status of your sync funcs syncedPollPeriod = 100 * time.Millisecond @@ -110,6 +112,60 @@ const ( initialBufferSize = 1024 ) +// WaitForNamedCacheSync is a wrapper around WaitForCacheSync that generates log messages +// indicating that the caller identified by name is waiting for syncs, followed by +// either a successful or failed sync. +// +// Contextual logging: WaitForNamedCacheSyncWithContext should be used instead of WaitForNamedCacheSync in code which supports contextual logging. +func WaitForNamedCacheSync(controllerName string, stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool { + klog.Background().Info("Waiting for caches to sync", "controller", controllerName) + + if !WaitForCacheSync(stopCh, cacheSyncs...) { + utilruntime.HandleErrorWithContext(context.Background(), nil, "Unable to sync caches", "controller", controllerName) + return false + } + + klog.Background().Info("Caches are synced", "controller", controllerName) + return true +} + +// WaitForNamedCacheSyncWithContext is a wrapper around WaitForCacheSyncWithContext that generates log messages +// indicating that the caller is waiting for syncs, followed by either a successful or failed sync. +// +// Contextual logging can be used to identify the caller in those log messages. The log level is zero, +// the same as in [WaitForNamedCacheSync]. If this is too verbose, then store a logger with an increased +// threshold in the context: +// +// WaitForNamedCacheSyncWithContext(klog.NewContext(ctx, logger.V(5)), ...) +func WaitForNamedCacheSyncWithContext(ctx context.Context, cacheSyncs ...InformerSynced) bool { + logger := klog.FromContext(ctx) + logger.Info("Waiting for caches to sync") + + if !WaitForCacheSync(ctx.Done(), cacheSyncs...) { + utilruntime.HandleErrorWithContext(ctx, nil, "Unable to sync caches") + return false + } + + logger.Info("Caches are synced") + return true +} + +// WaitForCacheSync waits for caches to populate. It returns true if it was successful, false +// if the controller should shutdown +// callers should prefer WaitForNamedCacheSync() +func WaitForCacheSync(stopCh <-chan struct{}, cacheSyncs ...InformerSynced) bool { + err := wait.PollUntilContextCancel(wait.ContextForChannel(stopCh), syncedPollPeriod, true, + func(context.Context) (bool, error) { + for _, syncFunc := range cacheSyncs { + if !syncFunc() { + return false, nil + } + } + return true, nil + }) + return err == nil +} + // `*sharedIndexInformer` implements SharedIndexInformer and has three // main components. One is an indexed local cache, `indexer cache.Indexer`. // The second main component is a cache.Controller that pulls @@ -356,7 +412,7 @@ func (s *sharedIndexInformer) GetController() cache.Controller { } func (s *sharedIndexInformer) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { - return s.AddEventHandlerWithResyncPeriod(handler, s.defaultEventHandlerResyncPeriod) + return s.AddEventHandlerWithOptions(handler, cache.HandlerOptions{}) } func determineResyncPeriod(logger klog.Logger, desired, check time.Duration) time.Duration { @@ -409,8 +465,7 @@ func (s *sharedIndexInformer) AddEventHandlerWithOptions(handler cache.ResourceE } } } - // TODO: upstream returns s.HasSynced, why don't we? - listener := newProcessListener(logger, handler, resyncPeriod, determineResyncPeriod(logger, resyncPeriod, s.resyncCheckPeriod), s.clock.Now(), initialBufferSize, func() bool { return true }) + listener := newProcessListener(logger, handler, resyncPeriod, determineResyncPeriod(logger, resyncPeriod, s.resyncCheckPeriod), s.clock.Now(), initialBufferSize, s.HasSynced) if !s.started { return s.processor.addListener(listener), nil @@ -445,7 +500,7 @@ func (s *sharedIndexInformer) HandleDeltas(obj interface{}, isInInitialList bool defer s.blockDeltas.Unlock() if deltas, ok := obj.(cache.Deltas); ok { - return processDeltas(s, s.indexer, s.transform, deltas, isInInitialList) + return processDeltas(s, s.indexer, deltas, isInInitialList) } return errors.New("object given as Process argument is not Deltas") } @@ -841,20 +896,12 @@ func processDeltas( // Object which receives event notifications from the given deltas handler cache.ResourceEventHandler, clientState cache.Store, - transformer cache.TransformFunc, deltas cache.Deltas, isInInitialList bool, ) error { // from oldest to newest for _, d := range deltas { obj := d.Object - if transformer != nil { - var err error - obj, err = transformer(obj) - if err != nil { - return err - } - } switch d.Type { case cache.Sync, cache.Replaced, cache.Added, cache.Updated: diff --git a/staging/src/github.com/kcp-dev/cli/go.mod b/staging/src/github.com/kcp-dev/cli/go.mod index 5476aad017b..d4f8ca70d89 100644 --- a/staging/src/github.com/kcp-dev/cli/go.mod +++ b/staging/src/github.com/kcp-dev/cli/go.mod @@ -13,11 +13,11 @@ require ( github.com/spf13/pflag v1.0.6 github.com/stretchr/testify v1.10.0 github.com/xlab/treeprint v1.2.0 - k8s.io/apiextensions-apiserver v0.33.3 - k8s.io/apimachinery v0.33.5 + k8s.io/apiextensions-apiserver v0.34.2 + k8s.io/apimachinery v0.34.2 k8s.io/cli-runtime v0.33.3 - k8s.io/client-go v0.33.5 - k8s.io/component-base v0.33.3 + k8s.io/client-go v0.34.2 + k8s.io/component-base v0.34.2 k8s.io/klog/v2 v2.130.1 ) @@ -32,9 +32,9 @@ require ( github.com/charmbracelet/x/term v0.2.1 // indirect github.com/clipperhouse/uax29/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.1 // indirect + github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect @@ -42,7 +42,7 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/gnostic-models v0.7.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect @@ -58,7 +58,7 @@ require ( github.com/mattn/go-runewidth v0.0.19 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect @@ -72,6 +72,8 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/net v0.40.0 // indirect golang.org/x/oauth2 v0.29.0 // indirect golang.org/x/sync v0.14.0 // indirect @@ -83,15 +85,15 @@ require ( 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.33.5 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + k8s.io/api v0.34.2 // indirect + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/kustomize/api v0.19.0 // indirect sigs.k8s.io/kustomize/kyaml v0.19.0 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) replace ( diff --git a/staging/src/github.com/kcp-dev/cli/go.sum b/staging/src/github.com/kcp-dev/cli/go.sum index 41f55feedb5..13f6f43db60 100644 --- a/staging/src/github.com/kcp-dev/cli/go.sum +++ b/staging/src/github.com/kcp-dev/cli/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= -cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -35,12 +35,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4= github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= @@ -57,11 +57,10 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= -github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= 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= @@ -105,8 +104,9 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/2gBQ3RWajuToeY6ZtZTIKv2v7ThUy5KKusIT0yc0= github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= @@ -168,12 +168,16 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= -go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= -go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= -go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -220,11 +224,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -237,24 +240,24 @@ 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.33.5 h1:YR+uhYj05jdRpcksv8kjSliW+v9hwXxn6Cv10aR8Juw= -k8s.io/api v0.33.5/go.mod h1:2gzShdwXKT5yPGiqrTrn/U/nLZ7ZyT4WuAj3XGDVgVs= -k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs= -k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8= -k8s.io/apimachinery v0.33.5 h1:NiT64hln4TQXeYR18/ES39OrNsjGz8NguxsBgp+6QIo= -k8s.io/apimachinery v0.33.5/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4= -k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo= +k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE= +k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI= k8s.io/cli-runtime v0.33.3 h1:Dgy4vPjNIu8LMJBSvs8W0LcdV0PX/8aGG1DA1W8lklA= k8s.io/cli-runtime v0.33.3/go.mod h1:yklhLklD4vLS8HNGgC9wGiuHWze4g7x6XQZ+8edsKEo= -k8s.io/client-go v0.33.5 h1:I8BdmQGxInpkMEnJvV6iG7dqzP3JRlpZZlib3OMFc3o= -k8s.io/client-go v0.33.5/go.mod h1:W8PQP4MxbM4ypgagVE65mUUqK1/ByQkSALF9tzuQ6u0= -k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA= -k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= +k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ= +k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM= 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-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= @@ -263,10 +266,9 @@ sigs.k8s.io/kustomize/api v0.19.0 h1:F+2HB2mU1MSiR9Hp1NEgoU2q9ItNOaBJl0I4Dlus5SQ sigs.k8s.io/kustomize/api v0.19.0/go.mod h1:/BbwnivGVcBh1r+8m3tH1VNxJmHSk1PzP5fkP6lbL1o= sigs.k8s.io/kustomize/kyaml v0.19.0 h1:RFge5qsO1uHhwJsu3ipV7RNolC7Uozc0jUBC/61XSlA= sigs.k8s.io/kustomize/kyaml v0.19.0/go.mod h1:FeKD5jEOH+FbZPpqUghBP8mrLjJ3+zD3/rf9NNu1cwY= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/staging/src/github.com/kcp-dev/cli/pkg/crd/plugin/snapshot_test.go b/staging/src/github.com/kcp-dev/cli/pkg/crd/plugin/snapshot_test.go index 81a661bd096..d2df2b628d3 100644 --- a/staging/src/github.com/kcp-dev/cli/pkg/crd/plugin/snapshot_test.go +++ b/staging/src/github.com/kcp-dev/cli/pkg/crd/plugin/snapshot_test.go @@ -56,7 +56,6 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 - creationTimestamp: null name: endpoints.core spec: group: "" @@ -205,7 +204,6 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.5.0 - creationTimestamp: null name: services.core spec: group: "" @@ -362,7 +360,6 @@ spec: var expectedYAML = `apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: testing.endpoints.core spec: conversion: @@ -583,7 +580,6 @@ spec: apiVersion: apis.kcp.io/v1alpha1 kind: APIResourceSchema metadata: - creationTimestamp: null name: testing.services.core spec: conversion: diff --git a/staging/src/github.com/kcp-dev/client-go/go.mod b/staging/src/github.com/kcp-dev/client-go/go.mod index ac08bd62935..d3e5e5edf9c 100644 --- a/staging/src/github.com/kcp-dev/client-go/go.mod +++ b/staging/src/github.com/kcp-dev/client-go/go.mod @@ -3,49 +3,50 @@ module github.com/kcp-dev/client-go go 1.24.0 require ( - github.com/google/gnostic-models v0.6.9 + github.com/google/gnostic-models v0.7.0 github.com/kcp-dev/apimachinery/v2 v2.0.0-00010101000000-000000000000 github.com/kcp-dev/code-generator/v3 v3.0.0-00010101000000-000000000000 github.com/kcp-dev/logicalcluster/v3 v3.0.5 gopkg.in/evanphx/json-patch.v4 v4.12.0 - k8s.io/api v0.33.5 - k8s.io/apiextensions-apiserver v0.33.3 - k8s.io/apimachinery v0.33.5 - k8s.io/client-go v0.33.5 + k8s.io/api v0.34.2 + k8s.io/apiextensions-apiserver v0.34.2 + k8s.io/apimachinery v0.34.2 + k8s.io/client-go v0.34.2 k8s.io/klog/v2 v2.130.1 - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 - sigs.k8s.io/yaml v1.4.0 + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 + sigs.k8s.io/yaml v1.6.0 ) require ( - cel.dev/expr v0.19.1 // indirect + cel.dev/expr v0.24.0 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.1 // indirect + github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/cel-go v0.23.2 // indirect + github.com/google/cel-go v0.26.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.9.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.22.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.62.0 // indirect @@ -56,13 +57,15 @@ require ( github.com/x448/float16 v0.8.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect - go.opentelemetry.io/otel v1.33.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect - go.opentelemetry.io/otel/metric v1.33.0 // indirect - go.opentelemetry.io/otel/sdk v1.33.0 // indirect - go.opentelemetry.io/otel/trace v1.33.0 // indirect - go.opentelemetry.io/proto/otlp v1.4.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.opentelemetry.io/proto/otlp v1.5.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect golang.org/x/mod v0.24.0 // indirect golang.org/x/net v0.40.0 // indirect @@ -73,20 +76,20 @@ require ( golang.org/x/text v0.25.0 // indirect golang.org/x/time v0.11.0 // indirect golang.org/x/tools v0.33.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/grpc v1.69.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect + google.golang.org/grpc v1.72.1 // indirect google.golang.org/protobuf v1.36.5 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiserver v0.33.3 // indirect - k8s.io/code-generator v0.33.3 // indirect - k8s.io/component-base v0.33.3 // indirect - k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + k8s.io/apiserver v0.34.2 // indirect + k8s.io/code-generator v0.34.2 // indirect + k8s.io/component-base v0.34.2 // indirect + k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect - sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/randfill v1.0.0 // indirect ) diff --git a/staging/src/github.com/kcp-dev/client-go/go.sum b/staging/src/github.com/kcp-dev/client-go/go.sum index bde8a53f63a..0663e13180f 100644 --- a/staging/src/github.com/kcp-dev/client-go/go.sum +++ b/staging/src/github.com/kcp-dev/client-go/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= -cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -19,12 +19,12 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -44,11 +44,10 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= -github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= 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= @@ -58,8 +57,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -83,8 +82,9 @@ github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUt github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= @@ -128,40 +128,44 @@ 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= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/etcd/api/v3 v3.5.21 h1:A6O2/JDb3tvHhiIz3xf9nJ7REHvtEFJJ3veW3FbCnS8= -go.etcd.io/etcd/api/v3 v3.5.21/go.mod h1:c3aH5wcvXv/9dqIw2Y810LDXJfhSYdHQ0vxmP3CCHVY= -go.etcd.io/etcd/client/pkg/v3 v3.5.21 h1:lPBu71Y7osQmzlflM9OfeIV2JlmpBjqBNlLtcoBqUTc= -go.etcd.io/etcd/client/pkg/v3 v3.5.21/go.mod h1:BgqT/IXPjK9NkeSDjbzwsHySX3yIle2+ndz28nVsjUs= -go.etcd.io/etcd/client/v3 v3.5.21 h1:T6b1Ow6fNjOLOtM0xSoKNQt1ASPCLWrF9XMHcH9pEyY= -go.etcd.io/etcd/client/v3 v3.5.21/go.mod h1:mFYy67IOqmbRf/kRUvsHixzo3iG+1OF2W2+jVIQRAnU= +go.etcd.io/etcd/api/v3 v3.6.4 h1:7F6N7toCKcV72QmoUKa23yYLiiljMrT4xCeBL9BmXdo= +go.etcd.io/etcd/api/v3 v3.6.4/go.mod h1:eFhhvfR8Px1P6SEuLT600v+vrhdDTdcfMzmnxVXXSbk= +go.etcd.io/etcd/client/pkg/v3 v3.6.4 h1:9HBYrjppeOfFjBjaMTRxT3R7xT0GLK8EJMVC4xg6ok0= +go.etcd.io/etcd/client/pkg/v3 v3.6.4/go.mod h1:sbdzr2cl3HzVmxNw//PH7aLGVtY4QySjQFuaCgcRFAI= +go.etcd.io/etcd/client/v3 v3.6.4 h1:YOMrCfMhRzY8NgtzUsHl8hC2EBSnuqbR3dh84Uryl7A= +go.etcd.io/etcd/client/v3 v3.6.4/go.mod h1:jaNNHCyg2FdALyKWnd7hxZXZxZANb0+KGY+YQaEMISo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= -go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= -go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= -go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= -go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= -go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= -go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= -go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= -go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -207,12 +211,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= +google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -225,36 +229,35 @@ 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.33.5 h1:YR+uhYj05jdRpcksv8kjSliW+v9hwXxn6Cv10aR8Juw= -k8s.io/api v0.33.5/go.mod h1:2gzShdwXKT5yPGiqrTrn/U/nLZ7ZyT4WuAj3XGDVgVs= -k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs= -k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8= -k8s.io/apimachinery v0.33.5 h1:NiT64hln4TQXeYR18/ES39OrNsjGz8NguxsBgp+6QIo= -k8s.io/apimachinery v0.33.5/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4= -k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E= -k8s.io/client-go v0.33.5 h1:I8BdmQGxInpkMEnJvV6iG7dqzP3JRlpZZlib3OMFc3o= -k8s.io/client-go v0.33.5/go.mod h1:W8PQP4MxbM4ypgagVE65mUUqK1/ByQkSALF9tzuQ6u0= -k8s.io/code-generator v0.33.3 h1:6+34LhYkIuQ/yn/E3qlpVqjQaP8smzCu4NE1A8b0LWs= -k8s.io/code-generator v0.33.3/go.mod h1:6Y02+HQJYgNphv9z3wJB5w+sjYDIEBQW7sh62PkufvA= -k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA= -k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4= -k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4 h1:iicENHE63xPBlGQeany8LqrH40Wh/48QhMRI/mGVsqA= -k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo= +k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE= +k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= +k8s.io/code-generator v0.34.2 h1:9bG6jTxmsU3HXE5BNYJTC8AZ1D6hVVfkm8yYSkdkGY0= +k8s.io/code-generator v0.34.2/go.mod h1:dnDDEd6S/z4uZ+PG1aE58ySCi/lR4+qT3a4DddE4/2I= +k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ= +k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/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= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8= -sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/interface.go index 33a637e3ec2..6ecf7629ce0 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/interface.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/interface.go @@ -23,6 +23,10 @@ import ( ) type ClusterInterface interface { + // MutatingAdmissionPolicies returns a MutatingAdmissionPolicyClusterInformer. + MutatingAdmissionPolicies() MutatingAdmissionPolicyClusterInformer + // MutatingAdmissionPolicyBindings returns a MutatingAdmissionPolicyBindingClusterInformer. + MutatingAdmissionPolicyBindings() MutatingAdmissionPolicyBindingClusterInformer // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationClusterInformer. MutatingWebhookConfigurations() MutatingWebhookConfigurationClusterInformer // ValidatingAdmissionPolicies returns a ValidatingAdmissionPolicyClusterInformer. @@ -43,6 +47,16 @@ func New(f kcpinternalinterfaces.SharedInformerFactory, tweakListOptions kcpinte return &version{factory: f, tweakListOptions: tweakListOptions} } +// MutatingAdmissionPolicies returns a MutatingAdmissionPolicyClusterInformer. +func (v *version) MutatingAdmissionPolicies() MutatingAdmissionPolicyClusterInformer { + return &mutatingAdmissionPolicyClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// MutatingAdmissionPolicyBindings returns a MutatingAdmissionPolicyBindingClusterInformer. +func (v *version) MutatingAdmissionPolicyBindings() MutatingAdmissionPolicyBindingClusterInformer { + return &mutatingAdmissionPolicyBindingClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // MutatingWebhookConfigurations returns a MutatingWebhookConfigurationClusterInformer. func (v *version) MutatingWebhookConfigurations() MutatingWebhookConfigurationClusterInformer { return &mutatingWebhookConfigurationClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/mutatingadmissionpolicy.go b/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/mutatingadmissionpolicy.go new file mode 100644 index 00000000000..d32bd527a01 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/mutatingadmissionpolicy.go @@ -0,0 +1,127 @@ +/* +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. +*/ + +// Code generated by cluster-informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + time "time" + + apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1beta1 "k8s.io/client-go/informers/admissionregistration/v1beta1" + listersadmissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" + cache "k8s.io/client-go/tools/cache" + + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" + kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" + kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" + kcpv1beta1 "github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1" + logicalcluster "github.com/kcp-dev/logicalcluster/v3" +) + +// MutatingAdmissionPolicyClusterInformer provides access to a shared informer and lister for +// MutatingAdmissionPolicies. +type MutatingAdmissionPolicyClusterInformer interface { + Cluster(logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyInformer + ClusterWithContext(context.Context, logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyInformer + Informer() kcpcache.ScopeableSharedIndexInformer + Lister() kcpv1beta1.MutatingAdmissionPolicyClusterLister +} + +type mutatingAdmissionPolicyClusterInformer struct { + factory kcpinternalinterfaces.SharedInformerFactory + tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc +} + +// NewMutatingAdmissionPolicyClusterInformer constructs a new informer for MutatingAdmissionPolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewMutatingAdmissionPolicyClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredMutatingAdmissionPolicyClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredMutatingAdmissionPolicyClusterInformer constructs a new informer for MutatingAdmissionPolicy type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredMutatingAdmissionPolicyClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { + return kcpinformers.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicies().List(context.Background(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicies().Watch(context.Background(), options) + }, + }, + &apiadmissionregistrationv1beta1.MutatingAdmissionPolicy{}, + resyncPeriod, + indexers, + ) +} + +func (i *mutatingAdmissionPolicyClusterInformer) defaultInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredMutatingAdmissionPolicyClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) +} + +func (i *mutatingAdmissionPolicyClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiadmissionregistrationv1beta1.MutatingAdmissionPolicy{}, i.defaultInformer) +} + +func (i *mutatingAdmissionPolicyClusterInformer) Lister() kcpv1beta1.MutatingAdmissionPolicyClusterLister { + return kcpv1beta1.NewMutatingAdmissionPolicyClusterLister(i.Informer().GetIndexer()) +} + +func (i *mutatingAdmissionPolicyClusterInformer) Cluster(clusterName logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyInformer { + return &mutatingAdmissionPolicyInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +func (i *mutatingAdmissionPolicyClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyInformer { + return &mutatingAdmissionPolicyInformer{ + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +type mutatingAdmissionPolicyInformer struct { + informer cache.SharedIndexInformer + lister listersadmissionregistrationv1beta1.MutatingAdmissionPolicyLister +} + +func (i *mutatingAdmissionPolicyInformer) Informer() cache.SharedIndexInformer { + return i.informer +} + +func (i *mutatingAdmissionPolicyInformer) Lister() listersadmissionregistrationv1beta1.MutatingAdmissionPolicyLister { + return i.lister +} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go b/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go new file mode 100644 index 00000000000..7980194ad52 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/informers/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go @@ -0,0 +1,127 @@ +/* +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. +*/ + +// Code generated by cluster-informer-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + time "time" + + apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1beta1 "k8s.io/client-go/informers/admissionregistration/v1beta1" + listersadmissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" + cache "k8s.io/client-go/tools/cache" + + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" + kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" + kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" + kcpv1beta1 "github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1" + logicalcluster "github.com/kcp-dev/logicalcluster/v3" +) + +// MutatingAdmissionPolicyBindingClusterInformer provides access to a shared informer and lister for +// MutatingAdmissionPolicyBindings. +type MutatingAdmissionPolicyBindingClusterInformer interface { + Cluster(logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInformer + ClusterWithContext(context.Context, logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInformer + Informer() kcpcache.ScopeableSharedIndexInformer + Lister() kcpv1beta1.MutatingAdmissionPolicyBindingClusterLister +} + +type mutatingAdmissionPolicyBindingClusterInformer struct { + factory kcpinternalinterfaces.SharedInformerFactory + tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc +} + +// NewMutatingAdmissionPolicyBindingClusterInformer constructs a new informer for MutatingAdmissionPolicyBinding type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewMutatingAdmissionPolicyBindingClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredMutatingAdmissionPolicyBindingClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredMutatingAdmissionPolicyBindingClusterInformer constructs a new informer for MutatingAdmissionPolicyBinding type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredMutatingAdmissionPolicyBindingClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { + return kcpinformers.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicyBindings().List(context.Background(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.AdmissionregistrationV1beta1().MutatingAdmissionPolicyBindings().Watch(context.Background(), options) + }, + }, + &apiadmissionregistrationv1beta1.MutatingAdmissionPolicyBinding{}, + resyncPeriod, + indexers, + ) +} + +func (i *mutatingAdmissionPolicyBindingClusterInformer) defaultInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredMutatingAdmissionPolicyBindingClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) +} + +func (i *mutatingAdmissionPolicyBindingClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apiadmissionregistrationv1beta1.MutatingAdmissionPolicyBinding{}, i.defaultInformer) +} + +func (i *mutatingAdmissionPolicyBindingClusterInformer) Lister() kcpv1beta1.MutatingAdmissionPolicyBindingClusterLister { + return kcpv1beta1.NewMutatingAdmissionPolicyBindingClusterLister(i.Informer().GetIndexer()) +} + +func (i *mutatingAdmissionPolicyBindingClusterInformer) Cluster(clusterName logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInformer { + return &mutatingAdmissionPolicyBindingInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +func (i *mutatingAdmissionPolicyBindingClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInformer { + return &mutatingAdmissionPolicyBindingInformer{ + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +type mutatingAdmissionPolicyBindingInformer struct { + informer cache.SharedIndexInformer + lister listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingLister +} + +func (i *mutatingAdmissionPolicyBindingInformer) Informer() cache.SharedIndexInformer { + return i.informer +} + +func (i *mutatingAdmissionPolicyBindingInformer) Lister() listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingLister { + return i.lister +} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/certificates/v1alpha1/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/certificates/v1alpha1/interface.go index 4928d90991d..3bcbaeeb880 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/certificates/v1alpha1/interface.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/certificates/v1alpha1/interface.go @@ -25,6 +25,8 @@ import ( type ClusterInterface interface { // ClusterTrustBundles returns a ClusterTrustBundleClusterInformer. ClusterTrustBundles() ClusterTrustBundleClusterInformer + // PodCertificateRequests returns a PodCertificateRequestClusterInformer. + PodCertificateRequests() PodCertificateRequestClusterInformer } type version struct { @@ -41,3 +43,8 @@ func New(f kcpinternalinterfaces.SharedInformerFactory, tweakListOptions kcpinte func (v *version) ClusterTrustBundles() ClusterTrustBundleClusterInformer { return &clusterTrustBundleClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// PodCertificateRequests returns a PodCertificateRequestClusterInformer. +func (v *version) PodCertificateRequests() PodCertificateRequestClusterInformer { + return &podCertificateRequestClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/certificates/v1alpha1/podcertificaterequest.go b/staging/src/github.com/kcp-dev/client-go/informers/certificates/v1alpha1/podcertificaterequest.go new file mode 100644 index 00000000000..fad39909fa4 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/informers/certificates/v1alpha1/podcertificaterequest.go @@ -0,0 +1,127 @@ +/* +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. +*/ + +// Code generated by cluster-informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + time "time" + + apicertificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + certificatesv1alpha1 "k8s.io/client-go/informers/certificates/v1alpha1" + listerscertificatesv1alpha1 "k8s.io/client-go/listers/certificates/v1alpha1" + cache "k8s.io/client-go/tools/cache" + + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" + kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" + kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" + kcpv1alpha1 "github.com/kcp-dev/client-go/listers/certificates/v1alpha1" + logicalcluster "github.com/kcp-dev/logicalcluster/v3" +) + +// PodCertificateRequestClusterInformer provides access to a shared informer and lister for +// PodCertificateRequests. +type PodCertificateRequestClusterInformer interface { + Cluster(logicalcluster.Name) certificatesv1alpha1.PodCertificateRequestInformer + ClusterWithContext(context.Context, logicalcluster.Name) certificatesv1alpha1.PodCertificateRequestInformer + Informer() kcpcache.ScopeableSharedIndexInformer + Lister() kcpv1alpha1.PodCertificateRequestClusterLister +} + +type podCertificateRequestClusterInformer struct { + factory kcpinternalinterfaces.SharedInformerFactory + tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc +} + +// NewPodCertificateRequestClusterInformer constructs a new informer for PodCertificateRequest type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewPodCertificateRequestClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredPodCertificateRequestClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredPodCertificateRequestClusterInformer constructs a new informer for PodCertificateRequest type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredPodCertificateRequestClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { + return kcpinformers.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CertificatesV1alpha1().PodCertificateRequests().List(context.Background(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.CertificatesV1alpha1().PodCertificateRequests().Watch(context.Background(), options) + }, + }, + &apicertificatesv1alpha1.PodCertificateRequest{}, + resyncPeriod, + indexers, + ) +} + +func (i *podCertificateRequestClusterInformer) defaultInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredPodCertificateRequestClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) +} + +func (i *podCertificateRequestClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apicertificatesv1alpha1.PodCertificateRequest{}, i.defaultInformer) +} + +func (i *podCertificateRequestClusterInformer) Lister() kcpv1alpha1.PodCertificateRequestClusterLister { + return kcpv1alpha1.NewPodCertificateRequestClusterLister(i.Informer().GetIndexer()) +} + +func (i *podCertificateRequestClusterInformer) Cluster(clusterName logicalcluster.Name) certificatesv1alpha1.PodCertificateRequestInformer { + return &podCertificateRequestInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +func (i *podCertificateRequestClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) certificatesv1alpha1.PodCertificateRequestInformer { + return &podCertificateRequestInformer{ + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +type podCertificateRequestInformer struct { + informer cache.SharedIndexInformer + lister listerscertificatesv1alpha1.PodCertificateRequestLister +} + +func (i *podCertificateRequestInformer) Informer() cache.SharedIndexInformer { + return i.informer +} + +func (i *podCertificateRequestInformer) Lister() listerscertificatesv1alpha1.PodCertificateRequestLister { + return i.lister +} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/generic.go b/staging/src/github.com/kcp-dev/client-go/informers/generic.go index 817ea0098b2..6ed93c15961 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/generic.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/generic.go @@ -52,7 +52,6 @@ import ( flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" v1beta3 "k8s.io/api/flowcontrol/v1beta3" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -62,6 +61,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" + resourcev1 "k8s.io/api/resource/v1" v1alpha3 "k8s.io/api/resource/v1alpha3" resourcev1beta1 "k8s.io/api/resource/v1beta1" resourcev1beta2 "k8s.io/api/resource/v1beta2" @@ -159,6 +159,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1alpha1().ValidatingAdmissionPolicyBindings().Informer()}, nil // Group=admissionregistration.k8s.io, Version=v1beta1 + case v1beta1.SchemeGroupVersion.WithResource("mutatingadmissionpolicies"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1beta1().MutatingAdmissionPolicies().Informer()}, nil + case v1beta1.SchemeGroupVersion.WithResource("mutatingadmissionpolicybindings"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1beta1().MutatingAdmissionPolicyBindings().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("mutatingwebhookconfigurations"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Admissionregistration().V1beta1().MutatingWebhookConfigurations().Informer()}, nil case v1beta1.SchemeGroupVersion.WithResource("validatingadmissionpolicies"): @@ -233,6 +237,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=certificates.k8s.io, Version=v1alpha1 case certificatesv1alpha1.SchemeGroupVersion.WithResource("clustertrustbundles"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().ClusterTrustBundles().Informer()}, nil + case certificatesv1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Certificates().V1alpha1().PodCertificateRequests().Informer()}, nil // Group=certificates.k8s.io, Version=v1beta1 case certificatesv1beta1.SchemeGroupVersion.WithResource("certificatesigningrequests"): @@ -356,12 +362,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case networkingv1.SchemeGroupVersion.WithResource("servicecidrs"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1().ServiceCIDRs().Informer()}, nil - // Group=networking.k8s.io, Version=v1alpha1 - case networkingv1alpha1.SchemeGroupVersion.WithResource("ipaddresses"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().IPAddresses().Informer()}, nil - case networkingv1alpha1.SchemeGroupVersion.WithResource("servicecidrs"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1alpha1().ServiceCIDRs().Informer()}, nil - // Group=networking.k8s.io, Version=v1beta1 case networkingv1beta1.SchemeGroupVersion.WithResource("ipaddresses"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Networking().V1beta1().IPAddresses().Informer()}, nil @@ -422,17 +422,19 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil + // Group=resource.k8s.io, Version=v1 + case resourcev1.SchemeGroupVersion.WithResource("deviceclasses"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1().DeviceClasses().Informer()}, nil + case resourcev1.SchemeGroupVersion.WithResource("resourceclaims"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1().ResourceClaims().Informer()}, nil + case resourcev1.SchemeGroupVersion.WithResource("resourceclaimtemplates"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1().ResourceClaimTemplates().Informer()}, nil + case resourcev1.SchemeGroupVersion.WithResource("resourceslices"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1().ResourceSlices().Informer()}, nil + // Group=resource.k8s.io, Version=v1alpha3 - case v1alpha3.SchemeGroupVersion.WithResource("deviceclasses"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceClasses().Informer()}, nil case v1alpha3.SchemeGroupVersion.WithResource("devicetaintrules"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().DeviceTaintRules().Informer()}, nil - case v1alpha3.SchemeGroupVersion.WithResource("resourceclaims"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaims().Informer()}, nil - case v1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceClaimTemplates().Informer()}, nil - case v1alpha3.SchemeGroupVersion.WithResource("resourceslices"): - return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha3().ResourceSlices().Informer()}, nil // Group=resource.k8s.io, Version=v1beta1 case resourcev1beta1.SchemeGroupVersion.WithResource("deviceclasses"): @@ -477,6 +479,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1().StorageClasses().Informer()}, nil case storagev1.SchemeGroupVersion.WithResource("volumeattachments"): return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1().VolumeAttachments().Informer()}, nil + case storagev1.SchemeGroupVersion.WithResource("volumeattributesclasses"): + return &genericClusterInformer{resource: resource.GroupResource(), informer: f.Storage().V1().VolumeAttributesClasses().Informer()}, nil // Group=storage.k8s.io, Version=v1alpha1 case storagev1alpha1.SchemeGroupVersion.WithResource("csistoragecapacities"): diff --git a/staging/src/github.com/kcp-dev/client-go/informers/networking/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/networking/interface.go index d302a4e818a..264062e1eb8 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/networking/interface.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/networking/interface.go @@ -21,7 +21,6 @@ package networking import ( kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" kcpv1 "github.com/kcp-dev/client-go/informers/networking/v1" - kcpv1alpha1 "github.com/kcp-dev/client-go/informers/networking/v1alpha1" kcpv1beta1 "github.com/kcp-dev/client-go/informers/networking/v1beta1" ) @@ -29,8 +28,6 @@ import ( type ClusterInterface interface { // V1 provides access to shared informers for resources in V1. V1() kcpv1.ClusterInterface - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() kcpv1alpha1.ClusterInterface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() kcpv1beta1.ClusterInterface } @@ -50,11 +47,6 @@ func (g *group) V1() kcpv1.ClusterInterface { return kcpv1.New(g.factory, g.tweakListOptions) } -// V1alpha1 returns a new kcpv1alpha1.ClusterInterface. -func (g *group) V1alpha1() kcpv1alpha1.ClusterInterface { - return kcpv1alpha1.New(g.factory, g.tweakListOptions) -} - // V1beta1 returns a new kcpv1beta1.ClusterInterface. func (g *group) V1beta1() kcpv1beta1.ClusterInterface { return kcpv1beta1.New(g.factory, g.tweakListOptions) diff --git a/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/interface.go deleted file mode 100644 index aead27acee5..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/interface.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" -) - -type ClusterInterface interface { - // IPAddresses returns a IPAddressClusterInformer. - IPAddresses() IPAddressClusterInformer - // ServiceCIDRs returns a ServiceCIDRClusterInformer. - ServiceCIDRs() ServiceCIDRClusterInformer -} - -type version struct { - factory kcpinternalinterfaces.SharedInformerFactory - tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f kcpinternalinterfaces.SharedInformerFactory, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) ClusterInterface { - return &version{factory: f, tweakListOptions: tweakListOptions} -} - -// IPAddresses returns a IPAddressClusterInformer. -func (v *version) IPAddresses() IPAddressClusterInformer { - return &iPAddressClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ServiceCIDRs returns a ServiceCIDRClusterInformer. -func (v *version) ServiceCIDRs() ServiceCIDRClusterInformer { - return &serviceCIDRClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/ipaddress.go b/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/ipaddress.go deleted file mode 100644 index 445db64d40c..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/ipaddress.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - apinetworkingv1alpha1 "k8s.io/api/networking/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - networkingv1alpha1 "k8s.io/client-go/informers/networking/v1alpha1" - listersnetworkingv1alpha1 "k8s.io/client-go/listers/networking/v1alpha1" - cache "k8s.io/client-go/tools/cache" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" - kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" - kcpv1alpha1 "github.com/kcp-dev/client-go/listers/networking/v1alpha1" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" -) - -// IPAddressClusterInformer provides access to a shared informer and lister for -// IPAddresses. -type IPAddressClusterInformer interface { - Cluster(logicalcluster.Name) networkingv1alpha1.IPAddressInformer - ClusterWithContext(context.Context, logicalcluster.Name) networkingv1alpha1.IPAddressInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kcpv1alpha1.IPAddressClusterLister -} - -type iPAddressClusterInformer struct { - factory kcpinternalinterfaces.SharedInformerFactory - tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc -} - -// NewIPAddressClusterInformer constructs a new informer for IPAddress type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIPAddressClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredIPAddressClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredIPAddressClusterInformer constructs a new informer for IPAddress type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredIPAddressClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.NetworkingV1alpha1().IPAddresses().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.NetworkingV1alpha1().IPAddresses().Watch(context.Background(), options) - }, - }, - &apinetworkingv1alpha1.IPAddress{}, - resyncPeriod, - indexers, - ) -} - -func (i *iPAddressClusterInformer) defaultInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredIPAddressClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *iPAddressClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apinetworkingv1alpha1.IPAddress{}, i.defaultInformer) -} - -func (i *iPAddressClusterInformer) Lister() kcpv1alpha1.IPAddressClusterLister { - return kcpv1alpha1.NewIPAddressClusterLister(i.Informer().GetIndexer()) -} - -func (i *iPAddressClusterInformer) Cluster(clusterName logicalcluster.Name) networkingv1alpha1.IPAddressInformer { - return &iPAddressInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *iPAddressClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) networkingv1alpha1.IPAddressInformer { - return &iPAddressInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type iPAddressInformer struct { - informer cache.SharedIndexInformer - lister listersnetworkingv1alpha1.IPAddressLister -} - -func (i *iPAddressInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *iPAddressInformer) Lister() listersnetworkingv1alpha1.IPAddressLister { - return i.lister -} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/servicecidr.go b/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/servicecidr.go deleted file mode 100644 index 8329a6eed58..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/informers/networking/v1alpha1/servicecidr.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - apinetworkingv1alpha1 "k8s.io/api/networking/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" - networkingv1alpha1 "k8s.io/client-go/informers/networking/v1alpha1" - listersnetworkingv1alpha1 "k8s.io/client-go/listers/networking/v1alpha1" - cache "k8s.io/client-go/tools/cache" - - kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" - kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" - kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" - kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" - kcpv1alpha1 "github.com/kcp-dev/client-go/listers/networking/v1alpha1" - logicalcluster "github.com/kcp-dev/logicalcluster/v3" -) - -// ServiceCIDRClusterInformer provides access to a shared informer and lister for -// ServiceCIDRs. -type ServiceCIDRClusterInformer interface { - Cluster(logicalcluster.Name) networkingv1alpha1.ServiceCIDRInformer - ClusterWithContext(context.Context, logicalcluster.Name) networkingv1alpha1.ServiceCIDRInformer - Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kcpv1alpha1.ServiceCIDRClusterLister -} - -type serviceCIDRClusterInformer struct { - factory kcpinternalinterfaces.SharedInformerFactory - tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc -} - -// NewServiceCIDRClusterInformer constructs a new informer for ServiceCIDR type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewServiceCIDRClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredServiceCIDRClusterInformer(client, resyncPeriod, indexers, nil) -} - -// NewFilteredServiceCIDRClusterInformer constructs a new informer for ServiceCIDR type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredServiceCIDRClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { - return kcpinformers.NewSharedIndexInformer( - &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.NetworkingV1alpha1().ServiceCIDRs().List(context.Background(), options) - }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&options) - } - return client.NetworkingV1alpha1().ServiceCIDRs().Watch(context.Background(), options) - }, - }, - &apinetworkingv1alpha1.ServiceCIDR{}, - resyncPeriod, - indexers, - ) -} - -func (i *serviceCIDRClusterInformer) defaultInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { - return NewFilteredServiceCIDRClusterInformer(client, resyncPeriod, cache.Indexers{ - kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, - kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, - }, i.tweakListOptions) -} - -func (i *serviceCIDRClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apinetworkingv1alpha1.ServiceCIDR{}, i.defaultInformer) -} - -func (i *serviceCIDRClusterInformer) Lister() kcpv1alpha1.ServiceCIDRClusterLister { - return kcpv1alpha1.NewServiceCIDRClusterLister(i.Informer().GetIndexer()) -} - -func (i *serviceCIDRClusterInformer) Cluster(clusterName logicalcluster.Name) networkingv1alpha1.ServiceCIDRInformer { - return &serviceCIDRInformer{ - informer: i.Informer().Cluster(clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -func (i *serviceCIDRClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) networkingv1alpha1.ServiceCIDRInformer { - return &serviceCIDRInformer{ - informer: i.Informer().ClusterWithContext(ctx, clusterName), - lister: i.Lister().Cluster(clusterName), - } -} - -type serviceCIDRInformer struct { - informer cache.SharedIndexInformer - lister listersnetworkingv1alpha1.ServiceCIDRLister -} - -func (i *serviceCIDRInformer) Informer() cache.SharedIndexInformer { - return i.informer -} - -func (i *serviceCIDRInformer) Lister() listersnetworkingv1alpha1.ServiceCIDRLister { - return i.lister -} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/resource/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/resource/interface.go index 7a553384975..3caa4f56fb1 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/resource/interface.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/resource/interface.go @@ -20,6 +20,7 @@ package resource import ( kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" + kcpv1 "github.com/kcp-dev/client-go/informers/resource/v1" kcpv1alpha3 "github.com/kcp-dev/client-go/informers/resource/v1alpha3" kcpv1beta1 "github.com/kcp-dev/client-go/informers/resource/v1beta1" kcpv1beta2 "github.com/kcp-dev/client-go/informers/resource/v1beta2" @@ -27,6 +28,8 @@ import ( // ClusterInterface provides access to each of this group's versions. type ClusterInterface interface { + // V1 provides access to shared informers for resources in V1. + V1() kcpv1.ClusterInterface // V1alpha3 provides access to shared informers for resources in V1alpha3. V1alpha3() kcpv1alpha3.ClusterInterface // V1beta1 provides access to shared informers for resources in V1beta1. @@ -45,6 +48,11 @@ func New(f kcpinternalinterfaces.SharedInformerFactory, tweakListOptions kcpinte return &group{factory: f, tweakListOptions: tweakListOptions} } +// V1 returns a new kcpv1.ClusterInterface. +func (g *group) V1() kcpv1.ClusterInterface { + return kcpv1.New(g.factory, g.tweakListOptions) +} + // V1alpha3 returns a new kcpv1alpha3.ClusterInterface. func (g *group) V1alpha3() kcpv1alpha3.ClusterInterface { return kcpv1alpha3.New(g.factory, g.tweakListOptions) diff --git a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/deviceclass.go b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/deviceclass.go similarity index 74% rename from staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/deviceclass.go rename to staging/src/github.com/kcp-dev/client-go/informers/resource/v1/deviceclass.go index 255e5e04daf..6c547e3d1af 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/deviceclass.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/deviceclass.go @@ -16,35 +16,35 @@ limitations under the License. // Code generated by cluster-informer-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" time "time" - apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiresourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/informers/resource/v1alpha3" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + resourcev1 "k8s.io/client-go/informers/resource/v1" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" cache "k8s.io/client-go/tools/cache" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" - kcpv1alpha3 "github.com/kcp-dev/client-go/listers/resource/v1alpha3" + kcpv1 "github.com/kcp-dev/client-go/listers/resource/v1" logicalcluster "github.com/kcp-dev/logicalcluster/v3" ) // DeviceClassClusterInformer provides access to a shared informer and lister for // DeviceClasses. type DeviceClassClusterInformer interface { - Cluster(logicalcluster.Name) resourcev1alpha3.DeviceClassInformer - ClusterWithContext(context.Context, logicalcluster.Name) resourcev1alpha3.DeviceClassInformer + Cluster(logicalcluster.Name) resourcev1.DeviceClassInformer + ClusterWithContext(context.Context, logicalcluster.Name) resourcev1.DeviceClassInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kcpv1alpha3.DeviceClassClusterLister + Lister() kcpv1.DeviceClassClusterLister } type deviceClassClusterInformer struct { @@ -65,20 +65,20 @@ func NewDeviceClassClusterInformer(client kcpkubernetes.ClusterInterface, resync func NewFilteredDeviceClassClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().DeviceClasses().List(context.Background(), options) + return client.ResourceV1().DeviceClasses().List(context.Background(), options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().DeviceClasses().Watch(context.Background(), options) + return client.ResourceV1().DeviceClasses().Watch(context.Background(), options) }, }, - &apiresourcev1alpha3.DeviceClass{}, + &apiresourcev1.DeviceClass{}, resyncPeriod, indexers, ) @@ -92,21 +92,21 @@ func (i *deviceClassClusterInformer) defaultInformer(client kcpkubernetes.Cluste } func (i *deviceClassClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiresourcev1alpha3.DeviceClass{}, i.defaultInformer) + return i.factory.InformerFor(&apiresourcev1.DeviceClass{}, i.defaultInformer) } -func (i *deviceClassClusterInformer) Lister() kcpv1alpha3.DeviceClassClusterLister { - return kcpv1alpha3.NewDeviceClassClusterLister(i.Informer().GetIndexer()) +func (i *deviceClassClusterInformer) Lister() kcpv1.DeviceClassClusterLister { + return kcpv1.NewDeviceClassClusterLister(i.Informer().GetIndexer()) } -func (i *deviceClassClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1alpha3.DeviceClassInformer { +func (i *deviceClassClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1.DeviceClassInformer { return &deviceClassInformer{ informer: i.Informer().Cluster(clusterName), lister: i.Lister().Cluster(clusterName), } } -func (i *deviceClassClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1alpha3.DeviceClassInformer { +func (i *deviceClassClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1.DeviceClassInformer { return &deviceClassInformer{ informer: i.Informer().ClusterWithContext(ctx, clusterName), lister: i.Lister().Cluster(clusterName), @@ -115,13 +115,13 @@ func (i *deviceClassClusterInformer) ClusterWithContext(ctx context.Context, clu type deviceClassInformer struct { informer cache.SharedIndexInformer - lister listersresourcev1alpha3.DeviceClassLister + lister listersresourcev1.DeviceClassLister } func (i *deviceClassInformer) Informer() cache.SharedIndexInformer { return i.informer } -func (i *deviceClassInformer) Lister() listersresourcev1alpha3.DeviceClassLister { +func (i *deviceClassInformer) Lister() listersresourcev1.DeviceClassLister { return i.lister } diff --git a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/interface.go new file mode 100644 index 00000000000..ba5881ef0f4 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/interface.go @@ -0,0 +1,64 @@ +/* +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. +*/ + +// Code generated by cluster-informer-gen. DO NOT EDIT. + +package v1 + +import ( + kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" +) + +type ClusterInterface interface { + // DeviceClasses returns a DeviceClassClusterInformer. + DeviceClasses() DeviceClassClusterInformer + // ResourceClaims returns a ResourceClaimClusterInformer. + ResourceClaims() ResourceClaimClusterInformer + // ResourceClaimTemplates returns a ResourceClaimTemplateClusterInformer. + ResourceClaimTemplates() ResourceClaimTemplateClusterInformer + // ResourceSlices returns a ResourceSliceClusterInformer. + ResourceSlices() ResourceSliceClusterInformer +} + +type version struct { + factory kcpinternalinterfaces.SharedInformerFactory + tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f kcpinternalinterfaces.SharedInformerFactory, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) ClusterInterface { + return &version{factory: f, tweakListOptions: tweakListOptions} +} + +// DeviceClasses returns a DeviceClassClusterInformer. +func (v *version) DeviceClasses() DeviceClassClusterInformer { + return &deviceClassClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ResourceClaims returns a ResourceClaimClusterInformer. +func (v *version) ResourceClaims() ResourceClaimClusterInformer { + return &resourceClaimClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ResourceClaimTemplates returns a ResourceClaimTemplateClusterInformer. +func (v *version) ResourceClaimTemplates() ResourceClaimTemplateClusterInformer { + return &resourceClaimTemplateClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + +// ResourceSlices returns a ResourceSliceClusterInformer. +func (v *version) ResourceSlices() ResourceSliceClusterInformer { + return &resourceSliceClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceclaim.go b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceclaim.go similarity index 74% rename from staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceclaim.go rename to staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceclaim.go index 222e99c2a60..649d195a1a8 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceclaim.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceclaim.go @@ -16,35 +16,35 @@ limitations under the License. // Code generated by cluster-informer-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" time "time" - apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiresourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/informers/resource/v1alpha3" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + resourcev1 "k8s.io/client-go/informers/resource/v1" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" cache "k8s.io/client-go/tools/cache" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" - kcpv1alpha3 "github.com/kcp-dev/client-go/listers/resource/v1alpha3" + kcpv1 "github.com/kcp-dev/client-go/listers/resource/v1" logicalcluster "github.com/kcp-dev/logicalcluster/v3" ) // ResourceClaimClusterInformer provides access to a shared informer and lister for // ResourceClaims. type ResourceClaimClusterInformer interface { - Cluster(logicalcluster.Name) resourcev1alpha3.ResourceClaimInformer - ClusterWithContext(context.Context, logicalcluster.Name) resourcev1alpha3.ResourceClaimInformer + Cluster(logicalcluster.Name) resourcev1.ResourceClaimInformer + ClusterWithContext(context.Context, logicalcluster.Name) resourcev1.ResourceClaimInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kcpv1alpha3.ResourceClaimClusterLister + Lister() kcpv1.ResourceClaimClusterLister } type resourceClaimClusterInformer struct { @@ -65,20 +65,20 @@ func NewResourceClaimClusterInformer(client kcpkubernetes.ClusterInterface, resy func NewFilteredResourceClaimClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceClaims().List(context.Background(), options) + return client.ResourceV1().ResourceClaims().List(context.Background(), options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceClaims().Watch(context.Background(), options) + return client.ResourceV1().ResourceClaims().Watch(context.Background(), options) }, }, - &apiresourcev1alpha3.ResourceClaim{}, + &apiresourcev1.ResourceClaim{}, resyncPeriod, indexers, ) @@ -92,21 +92,21 @@ func (i *resourceClaimClusterInformer) defaultInformer(client kcpkubernetes.Clus } func (i *resourceClaimClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiresourcev1alpha3.ResourceClaim{}, i.defaultInformer) + return i.factory.InformerFor(&apiresourcev1.ResourceClaim{}, i.defaultInformer) } -func (i *resourceClaimClusterInformer) Lister() kcpv1alpha3.ResourceClaimClusterLister { - return kcpv1alpha3.NewResourceClaimClusterLister(i.Informer().GetIndexer()) +func (i *resourceClaimClusterInformer) Lister() kcpv1.ResourceClaimClusterLister { + return kcpv1.NewResourceClaimClusterLister(i.Informer().GetIndexer()) } -func (i *resourceClaimClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1alpha3.ResourceClaimInformer { +func (i *resourceClaimClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1.ResourceClaimInformer { return &resourceClaimInformer{ informer: i.Informer().Cluster(clusterName), lister: i.Lister().Cluster(clusterName), } } -func (i *resourceClaimClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1alpha3.ResourceClaimInformer { +func (i *resourceClaimClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1.ResourceClaimInformer { return &resourceClaimInformer{ informer: i.Informer().ClusterWithContext(ctx, clusterName), lister: i.Lister().Cluster(clusterName), @@ -115,13 +115,13 @@ func (i *resourceClaimClusterInformer) ClusterWithContext(ctx context.Context, c type resourceClaimInformer struct { informer cache.SharedIndexInformer - lister listersresourcev1alpha3.ResourceClaimLister + lister listersresourcev1.ResourceClaimLister } func (i *resourceClaimInformer) Informer() cache.SharedIndexInformer { return i.informer } -func (i *resourceClaimInformer) Lister() listersresourcev1alpha3.ResourceClaimLister { +func (i *resourceClaimInformer) Lister() listersresourcev1.ResourceClaimLister { return i.lister } diff --git a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceclaimtemplate.go b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceclaimtemplate.go similarity index 75% rename from staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceclaimtemplate.go rename to staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceclaimtemplate.go index 89133b45649..c00578c5140 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceclaimtemplate.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceclaimtemplate.go @@ -16,35 +16,35 @@ limitations under the License. // Code generated by cluster-informer-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" time "time" - apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiresourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/informers/resource/v1alpha3" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + resourcev1 "k8s.io/client-go/informers/resource/v1" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" cache "k8s.io/client-go/tools/cache" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" - kcpv1alpha3 "github.com/kcp-dev/client-go/listers/resource/v1alpha3" + kcpv1 "github.com/kcp-dev/client-go/listers/resource/v1" logicalcluster "github.com/kcp-dev/logicalcluster/v3" ) // ResourceClaimTemplateClusterInformer provides access to a shared informer and lister for // ResourceClaimTemplates. type ResourceClaimTemplateClusterInformer interface { - Cluster(logicalcluster.Name) resourcev1alpha3.ResourceClaimTemplateInformer - ClusterWithContext(context.Context, logicalcluster.Name) resourcev1alpha3.ResourceClaimTemplateInformer + Cluster(logicalcluster.Name) resourcev1.ResourceClaimTemplateInformer + ClusterWithContext(context.Context, logicalcluster.Name) resourcev1.ResourceClaimTemplateInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kcpv1alpha3.ResourceClaimTemplateClusterLister + Lister() kcpv1.ResourceClaimTemplateClusterLister } type resourceClaimTemplateClusterInformer struct { @@ -65,20 +65,20 @@ func NewResourceClaimTemplateClusterInformer(client kcpkubernetes.ClusterInterfa func NewFilteredResourceClaimTemplateClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceClaimTemplates().List(context.Background(), options) + return client.ResourceV1().ResourceClaimTemplates().List(context.Background(), options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceClaimTemplates().Watch(context.Background(), options) + return client.ResourceV1().ResourceClaimTemplates().Watch(context.Background(), options) }, }, - &apiresourcev1alpha3.ResourceClaimTemplate{}, + &apiresourcev1.ResourceClaimTemplate{}, resyncPeriod, indexers, ) @@ -92,21 +92,21 @@ func (i *resourceClaimTemplateClusterInformer) defaultInformer(client kcpkuberne } func (i *resourceClaimTemplateClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiresourcev1alpha3.ResourceClaimTemplate{}, i.defaultInformer) + return i.factory.InformerFor(&apiresourcev1.ResourceClaimTemplate{}, i.defaultInformer) } -func (i *resourceClaimTemplateClusterInformer) Lister() kcpv1alpha3.ResourceClaimTemplateClusterLister { - return kcpv1alpha3.NewResourceClaimTemplateClusterLister(i.Informer().GetIndexer()) +func (i *resourceClaimTemplateClusterInformer) Lister() kcpv1.ResourceClaimTemplateClusterLister { + return kcpv1.NewResourceClaimTemplateClusterLister(i.Informer().GetIndexer()) } -func (i *resourceClaimTemplateClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1alpha3.ResourceClaimTemplateInformer { +func (i *resourceClaimTemplateClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1.ResourceClaimTemplateInformer { return &resourceClaimTemplateInformer{ informer: i.Informer().Cluster(clusterName), lister: i.Lister().Cluster(clusterName), } } -func (i *resourceClaimTemplateClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1alpha3.ResourceClaimTemplateInformer { +func (i *resourceClaimTemplateClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1.ResourceClaimTemplateInformer { return &resourceClaimTemplateInformer{ informer: i.Informer().ClusterWithContext(ctx, clusterName), lister: i.Lister().Cluster(clusterName), @@ -115,13 +115,13 @@ func (i *resourceClaimTemplateClusterInformer) ClusterWithContext(ctx context.Co type resourceClaimTemplateInformer struct { informer cache.SharedIndexInformer - lister listersresourcev1alpha3.ResourceClaimTemplateLister + lister listersresourcev1.ResourceClaimTemplateLister } func (i *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer { return i.informer } -func (i *resourceClaimTemplateInformer) Lister() listersresourcev1alpha3.ResourceClaimTemplateLister { +func (i *resourceClaimTemplateInformer) Lister() listersresourcev1.ResourceClaimTemplateLister { return i.lister } diff --git a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceslice.go b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceslice.go similarity index 74% rename from staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceslice.go rename to staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceslice.go index 7997e801c9e..adba18062ef 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/resourceslice.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1/resourceslice.go @@ -16,35 +16,35 @@ limitations under the License. // Code generated by cluster-informer-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" time "time" - apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiresourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/informers/resource/v1alpha3" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + resourcev1 "k8s.io/client-go/informers/resource/v1" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" cache "k8s.io/client-go/tools/cache" kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" - kcpv1alpha3 "github.com/kcp-dev/client-go/listers/resource/v1alpha3" + kcpv1 "github.com/kcp-dev/client-go/listers/resource/v1" logicalcluster "github.com/kcp-dev/logicalcluster/v3" ) // ResourceSliceClusterInformer provides access to a shared informer and lister for // ResourceSlices. type ResourceSliceClusterInformer interface { - Cluster(logicalcluster.Name) resourcev1alpha3.ResourceSliceInformer - ClusterWithContext(context.Context, logicalcluster.Name) resourcev1alpha3.ResourceSliceInformer + Cluster(logicalcluster.Name) resourcev1.ResourceSliceInformer + ClusterWithContext(context.Context, logicalcluster.Name) resourcev1.ResourceSliceInformer Informer() kcpcache.ScopeableSharedIndexInformer - Lister() kcpv1alpha3.ResourceSliceClusterLister + Lister() kcpv1.ResourceSliceClusterLister } type resourceSliceClusterInformer struct { @@ -65,20 +65,20 @@ func NewResourceSliceClusterInformer(client kcpkubernetes.ClusterInterface, resy func NewFilteredResourceSliceClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { return kcpinformers.NewSharedIndexInformer( &cache.ListWatch{ - ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceSlices().List(context.Background(), options) + return client.ResourceV1().ResourceSlices().List(context.Background(), options) }, - WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.ResourceV1alpha3().ResourceSlices().Watch(context.Background(), options) + return client.ResourceV1().ResourceSlices().Watch(context.Background(), options) }, }, - &apiresourcev1alpha3.ResourceSlice{}, + &apiresourcev1.ResourceSlice{}, resyncPeriod, indexers, ) @@ -92,21 +92,21 @@ func (i *resourceSliceClusterInformer) defaultInformer(client kcpkubernetes.Clus } func (i *resourceSliceClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { - return i.factory.InformerFor(&apiresourcev1alpha3.ResourceSlice{}, i.defaultInformer) + return i.factory.InformerFor(&apiresourcev1.ResourceSlice{}, i.defaultInformer) } -func (i *resourceSliceClusterInformer) Lister() kcpv1alpha3.ResourceSliceClusterLister { - return kcpv1alpha3.NewResourceSliceClusterLister(i.Informer().GetIndexer()) +func (i *resourceSliceClusterInformer) Lister() kcpv1.ResourceSliceClusterLister { + return kcpv1.NewResourceSliceClusterLister(i.Informer().GetIndexer()) } -func (i *resourceSliceClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1alpha3.ResourceSliceInformer { +func (i *resourceSliceClusterInformer) Cluster(clusterName logicalcluster.Name) resourcev1.ResourceSliceInformer { return &resourceSliceInformer{ informer: i.Informer().Cluster(clusterName), lister: i.Lister().Cluster(clusterName), } } -func (i *resourceSliceClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1alpha3.ResourceSliceInformer { +func (i *resourceSliceClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) resourcev1.ResourceSliceInformer { return &resourceSliceInformer{ informer: i.Informer().ClusterWithContext(ctx, clusterName), lister: i.Lister().Cluster(clusterName), @@ -115,13 +115,13 @@ func (i *resourceSliceClusterInformer) ClusterWithContext(ctx context.Context, c type resourceSliceInformer struct { informer cache.SharedIndexInformer - lister listersresourcev1alpha3.ResourceSliceLister + lister listersresourcev1.ResourceSliceLister } func (i *resourceSliceInformer) Informer() cache.SharedIndexInformer { return i.informer } -func (i *resourceSliceInformer) Lister() listersresourcev1alpha3.ResourceSliceLister { +func (i *resourceSliceInformer) Lister() listersresourcev1.ResourceSliceLister { return i.lister } diff --git a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/interface.go index 1200b63341e..ebaec1a5ba3 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/interface.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/resource/v1alpha3/interface.go @@ -23,16 +23,8 @@ import ( ) type ClusterInterface interface { - // DeviceClasses returns a DeviceClassClusterInformer. - DeviceClasses() DeviceClassClusterInformer // DeviceTaintRules returns a DeviceTaintRuleClusterInformer. DeviceTaintRules() DeviceTaintRuleClusterInformer - // ResourceClaims returns a ResourceClaimClusterInformer. - ResourceClaims() ResourceClaimClusterInformer - // ResourceClaimTemplates returns a ResourceClaimTemplateClusterInformer. - ResourceClaimTemplates() ResourceClaimTemplateClusterInformer - // ResourceSlices returns a ResourceSliceClusterInformer. - ResourceSlices() ResourceSliceClusterInformer } type version struct { @@ -45,27 +37,7 @@ func New(f kcpinternalinterfaces.SharedInformerFactory, tweakListOptions kcpinte return &version{factory: f, tweakListOptions: tweakListOptions} } -// DeviceClasses returns a DeviceClassClusterInformer. -func (v *version) DeviceClasses() DeviceClassClusterInformer { - return &deviceClassClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - // DeviceTaintRules returns a DeviceTaintRuleClusterInformer. func (v *version) DeviceTaintRules() DeviceTaintRuleClusterInformer { return &deviceTaintRuleClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } - -// ResourceClaims returns a ResourceClaimClusterInformer. -func (v *version) ResourceClaims() ResourceClaimClusterInformer { - return &resourceClaimClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ResourceClaimTemplates returns a ResourceClaimTemplateClusterInformer. -func (v *version) ResourceClaimTemplates() ResourceClaimTemplateClusterInformer { - return &resourceClaimTemplateClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ResourceSlices returns a ResourceSliceClusterInformer. -func (v *version) ResourceSlices() ResourceSliceClusterInformer { - return &resourceSliceClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/storage/v1/interface.go b/staging/src/github.com/kcp-dev/client-go/informers/storage/v1/interface.go index a64dffb3748..af07515e593 100644 --- a/staging/src/github.com/kcp-dev/client-go/informers/storage/v1/interface.go +++ b/staging/src/github.com/kcp-dev/client-go/informers/storage/v1/interface.go @@ -33,6 +33,8 @@ type ClusterInterface interface { StorageClasses() StorageClassClusterInformer // VolumeAttachments returns a VolumeAttachmentClusterInformer. VolumeAttachments() VolumeAttachmentClusterInformer + // VolumeAttributesClasses returns a VolumeAttributesClassClusterInformer. + VolumeAttributesClasses() VolumeAttributesClassClusterInformer } type version struct { @@ -69,3 +71,8 @@ func (v *version) StorageClasses() StorageClassClusterInformer { func (v *version) VolumeAttachments() VolumeAttachmentClusterInformer { return &volumeAttachmentClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } + +// VolumeAttributesClasses returns a VolumeAttributesClassClusterInformer. +func (v *version) VolumeAttributesClasses() VolumeAttributesClassClusterInformer { + return &volumeAttributesClassClusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} diff --git a/staging/src/github.com/kcp-dev/client-go/informers/storage/v1/volumeattributesclass.go b/staging/src/github.com/kcp-dev/client-go/informers/storage/v1/volumeattributesclass.go new file mode 100644 index 00000000000..119398f1356 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/informers/storage/v1/volumeattributesclass.go @@ -0,0 +1,127 @@ +/* +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. +*/ + +// Code generated by cluster-informer-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + time "time" + + apistoragev1 "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + storagev1 "k8s.io/client-go/informers/storage/v1" + listersstoragev1 "k8s.io/client-go/listers/storage/v1" + cache "k8s.io/client-go/tools/cache" + + kcpcache "github.com/kcp-dev/apimachinery/v2/pkg/cache" + kcpinformers "github.com/kcp-dev/apimachinery/v2/third_party/informers" + kcpinternalinterfaces "github.com/kcp-dev/client-go/informers/internalinterfaces" + kcpkubernetes "github.com/kcp-dev/client-go/kubernetes" + kcpv1 "github.com/kcp-dev/client-go/listers/storage/v1" + logicalcluster "github.com/kcp-dev/logicalcluster/v3" +) + +// VolumeAttributesClassClusterInformer provides access to a shared informer and lister for +// VolumeAttributesClasses. +type VolumeAttributesClassClusterInformer interface { + Cluster(logicalcluster.Name) storagev1.VolumeAttributesClassInformer + ClusterWithContext(context.Context, logicalcluster.Name) storagev1.VolumeAttributesClassInformer + Informer() kcpcache.ScopeableSharedIndexInformer + Lister() kcpv1.VolumeAttributesClassClusterLister +} + +type volumeAttributesClassClusterInformer struct { + factory kcpinternalinterfaces.SharedInformerFactory + tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc +} + +// NewVolumeAttributesClassClusterInformer constructs a new informer for VolumeAttributesClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVolumeAttributesClassClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredVolumeAttributesClassClusterInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredVolumeAttributesClassClusterInformer constructs a new informer for VolumeAttributesClass type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVolumeAttributesClassClusterInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions kcpinternalinterfaces.TweakListOptionsFunc) kcpcache.ScopeableSharedIndexInformer { + return kcpinformers.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1().VolumeAttributesClasses().List(context.Background(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.StorageV1().VolumeAttributesClasses().Watch(context.Background(), options) + }, + }, + &apistoragev1.VolumeAttributesClass{}, + resyncPeriod, + indexers, + ) +} + +func (i *volumeAttributesClassClusterInformer) defaultInformer(client kcpkubernetes.ClusterInterface, resyncPeriod time.Duration) kcpcache.ScopeableSharedIndexInformer { + return NewFilteredVolumeAttributesClassClusterInformer(client, resyncPeriod, cache.Indexers{ + kcpcache.ClusterIndexName: kcpcache.ClusterIndexFunc, + kcpcache.ClusterAndNamespaceIndexName: kcpcache.ClusterAndNamespaceIndexFunc, + }, i.tweakListOptions) +} + +func (i *volumeAttributesClassClusterInformer) Informer() kcpcache.ScopeableSharedIndexInformer { + return i.factory.InformerFor(&apistoragev1.VolumeAttributesClass{}, i.defaultInformer) +} + +func (i *volumeAttributesClassClusterInformer) Lister() kcpv1.VolumeAttributesClassClusterLister { + return kcpv1.NewVolumeAttributesClassClusterLister(i.Informer().GetIndexer()) +} + +func (i *volumeAttributesClassClusterInformer) Cluster(clusterName logicalcluster.Name) storagev1.VolumeAttributesClassInformer { + return &volumeAttributesClassInformer{ + informer: i.Informer().Cluster(clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +func (i *volumeAttributesClassClusterInformer) ClusterWithContext(ctx context.Context, clusterName logicalcluster.Name) storagev1.VolumeAttributesClassInformer { + return &volumeAttributesClassInformer{ + informer: i.Informer().ClusterWithContext(ctx, clusterName), + lister: i.Lister().Cluster(clusterName), + } +} + +type volumeAttributesClassInformer struct { + informer cache.SharedIndexInformer + lister listersstoragev1.VolumeAttributesClassLister +} + +func (i *volumeAttributesClassInformer) Informer() cache.SharedIndexInformer { + return i.informer +} + +func (i *volumeAttributesClassInformer) Lister() listersstoragev1.VolumeAttributesClassLister { + return i.lister +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/clientset.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/clientset.go index 64169563fcc..ecbd91faddb 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/clientset.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/clientset.go @@ -63,7 +63,6 @@ import ( flowcontrolv1beta2 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta2" flowcontrolv1beta3 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta3" networkingv1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1" - networkingv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1" networkingv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1beta1" nodev1 "github.com/kcp-dev/client-go/kubernetes/typed/node/v1" nodev1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/node/v1alpha1" @@ -73,6 +72,7 @@ import ( rbacv1 "github.com/kcp-dev/client-go/kubernetes/typed/rbac/v1" rbacv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/rbac/v1alpha1" rbacv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/rbac/v1beta1" + resourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1" resourcev1alpha3 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3" resourcev1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1beta1" resourcev1beta2 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1beta2" @@ -124,7 +124,6 @@ type ClusterInterface interface { FlowcontrolV1beta2() flowcontrolv1beta2.FlowcontrolV1beta2ClusterInterface FlowcontrolV1beta3() flowcontrolv1beta3.FlowcontrolV1beta3ClusterInterface NetworkingV1() networkingv1.NetworkingV1ClusterInterface - NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1ClusterInterface NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1ClusterInterface NodeV1() nodev1.NodeV1ClusterInterface NodeV1alpha1() nodev1alpha1.NodeV1alpha1ClusterInterface @@ -134,6 +133,7 @@ type ClusterInterface interface { RbacV1() rbacv1.RbacV1ClusterInterface RbacV1alpha1() rbacv1alpha1.RbacV1alpha1ClusterInterface RbacV1beta1() rbacv1beta1.RbacV1beta1ClusterInterface + ResourceV1() resourcev1.ResourceV1ClusterInterface ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3ClusterInterface ResourceV1beta1() resourcev1beta1.ResourceV1beta1ClusterInterface ResourceV1beta2() resourcev1beta2.ResourceV1beta2ClusterInterface @@ -185,7 +185,6 @@ type ClusterClientset struct { flowcontrolV1beta2 *flowcontrolv1beta2.FlowcontrolV1beta2ClusterClient flowcontrolV1beta3 *flowcontrolv1beta3.FlowcontrolV1beta3ClusterClient networkingV1 *networkingv1.NetworkingV1ClusterClient - networkingV1alpha1 *networkingv1alpha1.NetworkingV1alpha1ClusterClient networkingV1beta1 *networkingv1beta1.NetworkingV1beta1ClusterClient nodeV1 *nodev1.NodeV1ClusterClient nodeV1alpha1 *nodev1alpha1.NodeV1alpha1ClusterClient @@ -195,6 +194,7 @@ type ClusterClientset struct { rbacV1 *rbacv1.RbacV1ClusterClient rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1ClusterClient rbacV1beta1 *rbacv1beta1.RbacV1beta1ClusterClient + resourceV1 *resourcev1.ResourceV1ClusterClient resourceV1alpha3 *resourcev1alpha3.ResourceV1alpha3ClusterClient resourceV1beta1 *resourcev1beta1.ResourceV1beta1ClusterClient resourceV1beta2 *resourcev1beta2.ResourceV1beta2ClusterClient @@ -390,11 +390,6 @@ func (c *ClusterClientset) NetworkingV1() networkingv1.NetworkingV1ClusterInterf return c.networkingV1 } -// NetworkingV1alpha1 retrieves the NetworkingV1alpha1ClusterClient. -func (c *ClusterClientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1ClusterInterface { - return c.networkingV1alpha1 -} - // NetworkingV1beta1 retrieves the NetworkingV1beta1ClusterClient. func (c *ClusterClientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1ClusterInterface { return c.networkingV1beta1 @@ -440,6 +435,11 @@ func (c *ClusterClientset) RbacV1beta1() rbacv1beta1.RbacV1beta1ClusterInterface return c.rbacV1beta1 } +// ResourceV1 retrieves the ResourceV1ClusterClient. +func (c *ClusterClientset) ResourceV1() resourcev1.ResourceV1ClusterInterface { + return c.resourceV1 +} + // ResourceV1alpha3 retrieves the ResourceV1alpha3ClusterClient. func (c *ClusterClientset) ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3ClusterInterface { return c.resourceV1alpha3 @@ -682,10 +682,6 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*ClusterCli if err != nil { return nil, err } - cs.networkingV1alpha1, err = networkingv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } cs.networkingV1beta1, err = networkingv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -722,6 +718,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*ClusterCli if err != nil { return nil, err } + cs.resourceV1, err = resourcev1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.resourceV1alpha3, err = resourcev1alpha3.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -818,7 +818,6 @@ func New(c *rest.Config) *ClusterClientset { cs.flowcontrolV1beta2 = flowcontrolv1beta2.NewForConfigOrDie(c) cs.flowcontrolV1beta3 = flowcontrolv1beta3.NewForConfigOrDie(c) cs.networkingV1 = networkingv1.NewForConfigOrDie(c) - cs.networkingV1alpha1 = networkingv1alpha1.NewForConfigOrDie(c) cs.networkingV1beta1 = networkingv1beta1.NewForConfigOrDie(c) cs.nodeV1 = nodev1.NewForConfigOrDie(c) cs.nodeV1alpha1 = nodev1alpha1.NewForConfigOrDie(c) @@ -828,6 +827,7 @@ func New(c *rest.Config) *ClusterClientset { cs.rbacV1 = rbacv1.NewForConfigOrDie(c) cs.rbacV1alpha1 = rbacv1alpha1.NewForConfigOrDie(c) cs.rbacV1beta1 = rbacv1beta1.NewForConfigOrDie(c) + cs.resourceV1 = resourcev1.NewForConfigOrDie(c) cs.resourceV1alpha3 = resourcev1alpha3.NewForConfigOrDie(c) cs.resourceV1beta1 = resourcev1beta1.NewForConfigOrDie(c) cs.resourceV1beta2 = resourcev1beta2.NewForConfigOrDie(c) diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/clientset.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/clientset.go index 29ca1529688..1ca67a89f76 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/clientset.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/clientset.go @@ -58,7 +58,6 @@ import ( flowcontrolv1beta2 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta2" flowcontrolv1beta3 "k8s.io/client-go/kubernetes/typed/flowcontrol/v1beta3" networkingv1 "k8s.io/client-go/kubernetes/typed/networking/v1" - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" networkingv1beta1 "k8s.io/client-go/kubernetes/typed/networking/v1beta1" nodev1 "k8s.io/client-go/kubernetes/typed/node/v1" nodev1alpha1 "k8s.io/client-go/kubernetes/typed/node/v1alpha1" @@ -68,6 +67,7 @@ import ( rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" + resourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" resourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" resourcev1beta1 "k8s.io/client-go/kubernetes/typed/resource/v1beta1" resourcev1beta2 "k8s.io/client-go/kubernetes/typed/resource/v1beta2" @@ -151,8 +151,6 @@ import ( kcpfakeflowcontrolv1beta3 "github.com/kcp-dev/client-go/kubernetes/typed/flowcontrol/v1beta3/fake" kcpnetworkingv1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1" kcpfakenetworkingv1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1/fake" - kcpnetworkingv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1" - kcpfakenetworkingv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake" kcpnetworkingv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1beta1" kcpfakenetworkingv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1beta1/fake" kcpnodev1 "github.com/kcp-dev/client-go/kubernetes/typed/node/v1" @@ -171,6 +169,8 @@ import ( kcpfakerbacv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/rbac/v1alpha1/fake" kcprbacv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/rbac/v1beta1" kcpfakerbacv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/rbac/v1beta1/fake" + kcpresourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1" + kcpfakeresourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake" kcpresourcev1alpha3 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3" kcpfakeresourcev1alpha3 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake" kcpresourcev1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1beta1" @@ -422,11 +422,6 @@ func (c *ClusterClientset) NetworkingV1() kcpnetworkingv1.NetworkingV1ClusterInt return &kcpfakenetworkingv1.NetworkingV1ClusterClient{Fake: &c.Fake} } -// NetworkingV1alpha1 retrieves the NetworkingV1alpha1ClusterClient -func (c *ClusterClientset) NetworkingV1alpha1() kcpnetworkingv1alpha1.NetworkingV1alpha1ClusterInterface { - return &kcpfakenetworkingv1alpha1.NetworkingV1alpha1ClusterClient{Fake: &c.Fake} -} - // NetworkingV1beta1 retrieves the NetworkingV1beta1ClusterClient func (c *ClusterClientset) NetworkingV1beta1() kcpnetworkingv1beta1.NetworkingV1beta1ClusterInterface { return &kcpfakenetworkingv1beta1.NetworkingV1beta1ClusterClient{Fake: &c.Fake} @@ -472,6 +467,11 @@ func (c *ClusterClientset) RbacV1beta1() kcprbacv1beta1.RbacV1beta1ClusterInterf return &kcpfakerbacv1beta1.RbacV1beta1ClusterClient{Fake: &c.Fake} } +// ResourceV1 retrieves the ResourceV1ClusterClient +func (c *ClusterClientset) ResourceV1() kcpresourcev1.ResourceV1ClusterInterface { + return &kcpfakeresourcev1.ResourceV1ClusterClient{Fake: &c.Fake} +} + // ResourceV1alpha3 retrieves the ResourceV1alpha3ClusterClient func (c *ClusterClientset) ResourceV1alpha3() kcpresourcev1alpha3.ResourceV1alpha3ClusterInterface { return &kcpfakeresourcev1alpha3.ResourceV1alpha3ClusterClient{Fake: &c.Fake} @@ -740,11 +740,6 @@ func (c *Clientset) NetworkingV1() networkingv1.NetworkingV1Interface { return &kcpfakenetworkingv1.NetworkingV1Client{Fake: c.Fake, ClusterPath: c.clusterPath} } -// NetworkingV1alpha1 retrieves the NetworkingV1alpha1Client -func (c *Clientset) NetworkingV1alpha1() networkingv1alpha1.NetworkingV1alpha1Interface { - return &kcpfakenetworkingv1alpha1.NetworkingV1alpha1Client{Fake: c.Fake, ClusterPath: c.clusterPath} -} - // NetworkingV1beta1 retrieves the NetworkingV1beta1Client func (c *Clientset) NetworkingV1beta1() networkingv1beta1.NetworkingV1beta1Interface { return &kcpfakenetworkingv1beta1.NetworkingV1beta1Client{Fake: c.Fake, ClusterPath: c.clusterPath} @@ -790,6 +785,11 @@ func (c *Clientset) RbacV1beta1() rbacv1beta1.RbacV1beta1Interface { return &kcpfakerbacv1beta1.RbacV1beta1Client{Fake: c.Fake, ClusterPath: c.clusterPath} } +// ResourceV1 retrieves the ResourceV1Client +func (c *Clientset) ResourceV1() resourcev1.ResourceV1Interface { + return &kcpfakeresourcev1.ResourceV1Client{Fake: c.Fake, ClusterPath: c.clusterPath} +} + // ResourceV1alpha3 retrieves the ResourceV1alpha3Client func (c *Clientset) ResourceV1alpha3() resourcev1alpha3.ResourceV1alpha3Interface { return &kcpfakeresourcev1alpha3.ResourceV1alpha3Client{Fake: c.Fake, ClusterPath: c.clusterPath} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/register.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/register.go index f6e3ca535f6..102ca7e45ed 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/register.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/fake/register.go @@ -54,7 +54,6 @@ import ( flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -64,6 +63,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" + resourcev1 "k8s.io/api/resource/v1" resourcev1alpha3 "k8s.io/api/resource/v1alpha3" resourcev1beta1 "k8s.io/api/resource/v1beta1" resourcev1beta2 "k8s.io/api/resource/v1beta2" @@ -120,7 +120,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ flowcontrolv1beta2.AddToScheme, flowcontrolv1beta3.AddToScheme, networkingv1.AddToScheme, - networkingv1alpha1.AddToScheme, networkingv1beta1.AddToScheme, nodev1.AddToScheme, nodev1alpha1.AddToScheme, @@ -130,6 +129,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ rbacv1.AddToScheme, rbacv1alpha1.AddToScheme, rbacv1beta1.AddToScheme, + resourcev1.AddToScheme, resourcev1alpha3.AddToScheme, resourcev1beta1.AddToScheme, resourcev1beta2.AddToScheme, diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/scheme/register.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/scheme/register.go index 69bd0252558..b4317523e50 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/scheme/register.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/scheme/register.go @@ -54,7 +54,6 @@ import ( flowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3" networkingv1 "k8s.io/api/networking/v1" - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1beta1 "k8s.io/api/networking/v1beta1" nodev1 "k8s.io/api/node/v1" nodev1alpha1 "k8s.io/api/node/v1alpha1" @@ -64,6 +63,7 @@ import ( rbacv1 "k8s.io/api/rbac/v1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1beta1 "k8s.io/api/rbac/v1beta1" + resourcev1 "k8s.io/api/resource/v1" resourcev1alpha3 "k8s.io/api/resource/v1alpha3" resourcev1beta1 "k8s.io/api/resource/v1beta1" resourcev1beta2 "k8s.io/api/resource/v1beta2" @@ -120,7 +120,6 @@ var localSchemeBuilder = runtime.SchemeBuilder{ flowcontrolv1beta2.AddToScheme, flowcontrolv1beta3.AddToScheme, networkingv1.AddToScheme, - networkingv1alpha1.AddToScheme, networkingv1beta1.AddToScheme, nodev1.AddToScheme, nodev1alpha1.AddToScheme, @@ -130,6 +129,7 @@ var localSchemeBuilder = runtime.SchemeBuilder{ rbacv1.AddToScheme, rbacv1alpha1.AddToScheme, rbacv1beta1.AddToScheme, + resourcev1.AddToScheme, resourcev1alpha3.AddToScheme, resourcev1beta1.AddToScheme, resourcev1beta2.AddToScheme, diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go index 4acec313334..f57df2f66fc 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/admissionregistration_client.go @@ -32,6 +32,8 @@ import ( type AdmissionregistrationV1beta1ClusterInterface interface { AdmissionregistrationV1beta1ClusterScoper + MutatingAdmissionPoliciesClusterGetter + MutatingAdmissionPolicyBindingsClusterGetter MutatingWebhookConfigurationsClusterGetter ValidatingAdmissionPoliciesClusterGetter ValidatingAdmissionPolicyBindingsClusterGetter @@ -54,6 +56,14 @@ func (c *AdmissionregistrationV1beta1ClusterClient) Cluster(clusterPath logicalc return c.clientCache.ClusterOrDie(clusterPath) } +func (c *AdmissionregistrationV1beta1ClusterClient) MutatingAdmissionPolicies() MutatingAdmissionPolicyClusterInterface { + return &mutatingAdmissionPoliciesClusterInterface{clientCache: c.clientCache} +} + +func (c *AdmissionregistrationV1beta1ClusterClient) MutatingAdmissionPolicyBindings() MutatingAdmissionPolicyBindingClusterInterface { + return &mutatingAdmissionPolicyBindingsClusterInterface{clientCache: c.clientCache} +} + func (c *AdmissionregistrationV1beta1ClusterClient) MutatingWebhookConfigurations() MutatingWebhookConfigurationClusterInterface { return &mutatingWebhookConfigurationsClusterInterface{clientCache: c.clientCache} } diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/admissionregistration_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/admissionregistration_client.go index e8cf6ea6f00..73c5bee5797 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/admissionregistration_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/admissionregistration_client.go @@ -40,6 +40,14 @@ func (c *AdmissionregistrationV1beta1ClusterClient) Cluster(clusterPath logicalc return &AdmissionregistrationV1beta1Client{Fake: c.Fake, ClusterPath: clusterPath} } +func (c *AdmissionregistrationV1beta1ClusterClient) MutatingAdmissionPolicies() kcpadmissionregistrationv1beta1.MutatingAdmissionPolicyClusterInterface { + return newFakeMutatingAdmissionPolicyClusterClient(c) +} + +func (c *AdmissionregistrationV1beta1ClusterClient) MutatingAdmissionPolicyBindings() kcpadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingClusterInterface { + return newFakeMutatingAdmissionPolicyBindingClusterClient(c) +} + func (c *AdmissionregistrationV1beta1ClusterClient) MutatingWebhookConfigurations() kcpadmissionregistrationv1beta1.MutatingWebhookConfigurationClusterInterface { return newFakeMutatingWebhookConfigurationClusterClient(c) } @@ -61,6 +69,14 @@ type AdmissionregistrationV1beta1Client struct { ClusterPath logicalcluster.Path } +func (c *AdmissionregistrationV1beta1Client) MutatingAdmissionPolicies() admissionregistrationv1beta1.MutatingAdmissionPolicyInterface { + return newFakeMutatingAdmissionPolicyClient(c.Fake, c.ClusterPath) +} + +func (c *AdmissionregistrationV1beta1Client) MutatingAdmissionPolicyBindings() admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInterface { + return newFakeMutatingAdmissionPolicyBindingClient(c.Fake, c.ClusterPath) +} + func (c *AdmissionregistrationV1beta1Client) MutatingWebhookConfigurations() admissionregistrationv1beta1.MutatingWebhookConfigurationInterface { return newFakeMutatingWebhookConfigurationClient(c.Fake, c.ClusterPath) } diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/mutatingadmissionpolicy.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/mutatingadmissionpolicy.go new file mode 100644 index 00000000000..34a7fc884a3 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/mutatingadmissionpolicy.go @@ -0,0 +1,98 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" + typedadmissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + + typedkcpadmissionregistrationv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// mutatingAdmissionPolicyClusterClient implements MutatingAdmissionPolicyClusterInterface +type mutatingAdmissionPolicyClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*admissionregistrationv1beta1.MutatingAdmissionPolicy, *admissionregistrationv1beta1.MutatingAdmissionPolicyList] + Fake *kcptesting.Fake +} + +func newFakeMutatingAdmissionPolicyClusterClient(fake *AdmissionregistrationV1beta1ClusterClient) typedkcpadmissionregistrationv1beta1.MutatingAdmissionPolicyClusterInterface { + return &mutatingAdmissionPolicyClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*admissionregistrationv1beta1.MutatingAdmissionPolicy, *admissionregistrationv1beta1.MutatingAdmissionPolicyList]( + fake.Fake, + admissionregistrationv1beta1.SchemeGroupVersion.WithResource("mutatingadmissionpolicies"), + admissionregistrationv1beta1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicy"), + func() *admissionregistrationv1beta1.MutatingAdmissionPolicy { + return &admissionregistrationv1beta1.MutatingAdmissionPolicy{} + }, + func() *admissionregistrationv1beta1.MutatingAdmissionPolicyList { + return &admissionregistrationv1beta1.MutatingAdmissionPolicyList{} + }, + func(dst, src *admissionregistrationv1beta1.MutatingAdmissionPolicyList) { dst.ListMeta = src.ListMeta }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyList) []*admissionregistrationv1beta1.MutatingAdmissionPolicy { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyList, items []*admissionregistrationv1beta1.MutatingAdmissionPolicy) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *mutatingAdmissionPolicyClusterClient) Cluster(cluster logicalcluster.Path) typedadmissionregistrationv1beta1.MutatingAdmissionPolicyInterface { + return newFakeMutatingAdmissionPolicyClient(c.Fake, cluster) +} + +// mutatingAdmissionPolicyScopedClient implements MutatingAdmissionPolicyInterface +type mutatingAdmissionPolicyScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*admissionregistrationv1beta1.MutatingAdmissionPolicy, *admissionregistrationv1beta1.MutatingAdmissionPolicyList, *v1beta1.MutatingAdmissionPolicyApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakeMutatingAdmissionPolicyClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedadmissionregistrationv1beta1.MutatingAdmissionPolicyInterface { + return &mutatingAdmissionPolicyScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*admissionregistrationv1beta1.MutatingAdmissionPolicy, *admissionregistrationv1beta1.MutatingAdmissionPolicyList, *v1beta1.MutatingAdmissionPolicyApplyConfiguration]( + fake, + clusterPath, + "", + admissionregistrationv1beta1.SchemeGroupVersion.WithResource("mutatingadmissionpolicies"), + admissionregistrationv1beta1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicy"), + func() *admissionregistrationv1beta1.MutatingAdmissionPolicy { + return &admissionregistrationv1beta1.MutatingAdmissionPolicy{} + }, + func() *admissionregistrationv1beta1.MutatingAdmissionPolicyList { + return &admissionregistrationv1beta1.MutatingAdmissionPolicyList{} + }, + func(dst, src *admissionregistrationv1beta1.MutatingAdmissionPolicyList) { dst.ListMeta = src.ListMeta }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyList) []*admissionregistrationv1beta1.MutatingAdmissionPolicy { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyList, items []*admissionregistrationv1beta1.MutatingAdmissionPolicy) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/mutatingadmissionpolicybinding.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/mutatingadmissionpolicybinding.go new file mode 100644 index 00000000000..f8e8d32a3f0 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/fake/mutatingadmissionpolicybinding.go @@ -0,0 +1,102 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1beta1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1beta1" + typedadmissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + + typedkcpadmissionregistrationv1beta1 "github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// mutatingAdmissionPolicyBindingClusterClient implements MutatingAdmissionPolicyBindingClusterInterface +type mutatingAdmissionPolicyBindingClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList] + Fake *kcptesting.Fake +} + +func newFakeMutatingAdmissionPolicyBindingClusterClient(fake *AdmissionregistrationV1beta1ClusterClient) typedkcpadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingClusterInterface { + return &mutatingAdmissionPolicyBindingClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList]( + fake.Fake, + admissionregistrationv1beta1.SchemeGroupVersion.WithResource("mutatingadmissionpolicybindings"), + admissionregistrationv1beta1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicyBinding"), + func() *admissionregistrationv1beta1.MutatingAdmissionPolicyBinding { + return &admissionregistrationv1beta1.MutatingAdmissionPolicyBinding{} + }, + func() *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList { + return &admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList{} + }, + func(dst, src *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList) { + dst.ListMeta = src.ListMeta + }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList) []*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList, items []*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *mutatingAdmissionPolicyBindingClusterClient) Cluster(cluster logicalcluster.Path) typedadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingInterface { + return newFakeMutatingAdmissionPolicyBindingClient(c.Fake, cluster) +} + +// mutatingAdmissionPolicyBindingScopedClient implements MutatingAdmissionPolicyBindingInterface +type mutatingAdmissionPolicyBindingScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList, *v1beta1.MutatingAdmissionPolicyBindingApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakeMutatingAdmissionPolicyBindingClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingInterface { + return &mutatingAdmissionPolicyBindingScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList, *v1beta1.MutatingAdmissionPolicyBindingApplyConfiguration]( + fake, + clusterPath, + "", + admissionregistrationv1beta1.SchemeGroupVersion.WithResource("mutatingadmissionpolicybindings"), + admissionregistrationv1beta1.SchemeGroupVersion.WithKind("MutatingAdmissionPolicyBinding"), + func() *admissionregistrationv1beta1.MutatingAdmissionPolicyBinding { + return &admissionregistrationv1beta1.MutatingAdmissionPolicyBinding{} + }, + func() *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList { + return &admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList{} + }, + func(dst, src *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList) { + dst.ListMeta = src.ListMeta + }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList) []*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *admissionregistrationv1beta1.MutatingAdmissionPolicyBindingList, items []*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go index b5348cea7ff..f09cf8e4883 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/generated_expansion.go @@ -18,6 +18,10 @@ limitations under the License. package v1beta1 +type MutatingAdmissionPolicyClusterExpansion interface{} + +type MutatingAdmissionPolicyBindingClusterExpansion interface{} + type MutatingWebhookConfigurationClusterExpansion interface{} type ValidatingAdmissionPolicyClusterExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingadmissionpolicy.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingadmissionpolicy.go new file mode 100644 index 00000000000..2c42f7ad99b --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingadmissionpolicy.go @@ -0,0 +1,69 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" +) + +// MutatingAdmissionPoliciesClusterGetter has a method to return a MutatingAdmissionPolicyClusterInterface. +// A group's cluster client should implement this interface. +type MutatingAdmissionPoliciesClusterGetter interface { + MutatingAdmissionPolicies() MutatingAdmissionPolicyClusterInterface +} + +// MutatingAdmissionPolicyClusterInterface can operate on MutatingAdmissionPolicies across all clusters, +// or scope down to one cluster and return a admissionregistrationv1beta1.MutatingAdmissionPolicyInterface. +type MutatingAdmissionPolicyClusterInterface interface { + Cluster(logicalcluster.Path) admissionregistrationv1beta1.MutatingAdmissionPolicyInterface + List(ctx context.Context, opts v1.ListOptions) (*apiadmissionregistrationv1beta1.MutatingAdmissionPolicyList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + MutatingAdmissionPolicyClusterExpansion +} + +type mutatingAdmissionPoliciesClusterInterface struct { + clientCache kcpclient.Cache[*admissionregistrationv1beta1.AdmissionregistrationV1beta1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *mutatingAdmissionPoliciesClusterInterface) Cluster(clusterPath logicalcluster.Path) admissionregistrationv1beta1.MutatingAdmissionPolicyInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).MutatingAdmissionPolicies() +} + +// List returns the entire collection of all MutatingAdmissionPolicies across all clusters. +func (c *mutatingAdmissionPoliciesClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*apiadmissionregistrationv1beta1.MutatingAdmissionPolicyList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).MutatingAdmissionPolicies().List(ctx, opts) +} + +// Watch begins to watch all MutatingAdmissionPolicies across all clusters. +func (c *mutatingAdmissionPoliciesClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).MutatingAdmissionPolicies().Watch(ctx, opts) +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go new file mode 100644 index 00000000000..2c8e5d68e29 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go @@ -0,0 +1,69 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + context "context" + + apiadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + watch "k8s.io/apimachinery/pkg/watch" + admissionregistrationv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" +) + +// MutatingAdmissionPolicyBindingsClusterGetter has a method to return a MutatingAdmissionPolicyBindingClusterInterface. +// A group's cluster client should implement this interface. +type MutatingAdmissionPolicyBindingsClusterGetter interface { + MutatingAdmissionPolicyBindings() MutatingAdmissionPolicyBindingClusterInterface +} + +// MutatingAdmissionPolicyBindingClusterInterface can operate on MutatingAdmissionPolicyBindings across all clusters, +// or scope down to one cluster and return a admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInterface. +type MutatingAdmissionPolicyBindingClusterInterface interface { + Cluster(logicalcluster.Path) admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInterface + List(ctx context.Context, opts v1.ListOptions) (*apiadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + MutatingAdmissionPolicyBindingClusterExpansion +} + +type mutatingAdmissionPolicyBindingsClusterInterface struct { + clientCache kcpclient.Cache[*admissionregistrationv1beta1.AdmissionregistrationV1beta1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *mutatingAdmissionPolicyBindingsClusterInterface) Cluster(clusterPath logicalcluster.Path) admissionregistrationv1beta1.MutatingAdmissionPolicyBindingInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).MutatingAdmissionPolicyBindings() +} + +// List returns the entire collection of all MutatingAdmissionPolicyBindings across all clusters. +func (c *mutatingAdmissionPolicyBindingsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*apiadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).MutatingAdmissionPolicyBindings().List(ctx, opts) +} + +// Watch begins to watch all MutatingAdmissionPolicyBindings across all clusters. +func (c *mutatingAdmissionPolicyBindingsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).MutatingAdmissionPolicyBindings().Watch(ctx, opts) +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go index 7aa4ad64ebf..ea92d67df24 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/certificates_client.go @@ -33,6 +33,7 @@ import ( type CertificatesV1alpha1ClusterInterface interface { CertificatesV1alpha1ClusterScoper ClusterTrustBundlesClusterGetter + PodCertificateRequestsClusterGetter } type CertificatesV1alpha1ClusterScoper interface { @@ -55,6 +56,10 @@ func (c *CertificatesV1alpha1ClusterClient) ClusterTrustBundles() ClusterTrustBu return &clusterTrustBundlesClusterInterface{clientCache: c.clientCache} } +func (c *CertificatesV1alpha1ClusterClient) PodCertificateRequests() PodCertificateRequestClusterInterface { + return &podCertificateRequestsClusterInterface{clientCache: c.clientCache} +} + // NewForConfig creates a new CertificatesV1alpha1ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/fake/certificates_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/fake/certificates_client.go index d9c2e0561fa..b59e0012dcb 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/fake/certificates_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/fake/certificates_client.go @@ -44,6 +44,10 @@ func (c *CertificatesV1alpha1ClusterClient) ClusterTrustBundles() kcpcertificate return newFakeClusterTrustBundleClusterClient(c) } +func (c *CertificatesV1alpha1ClusterClient) PodCertificateRequests() kcpcertificatesv1alpha1.PodCertificateRequestClusterInterface { + return newFakePodCertificateRequestClusterClient(c) +} + type CertificatesV1alpha1Client struct { *kcptesting.Fake ClusterPath logicalcluster.Path @@ -53,6 +57,10 @@ func (c *CertificatesV1alpha1Client) ClusterTrustBundles() certificatesv1alpha1. return newFakeClusterTrustBundleClient(c.Fake, c.ClusterPath) } +func (c *CertificatesV1alpha1Client) PodCertificateRequests(namespace string) certificatesv1alpha1.PodCertificateRequestInterface { + return newFakePodCertificateRequestClient(c.Fake, namespace, c.ClusterPath) +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *CertificatesV1alpha1Client) RESTClient() rest.Interface { diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/fake/podcertificaterequest.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/fake/podcertificaterequest.go new file mode 100644 index 00000000000..e66bad02e56 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/fake/podcertificaterequest.go @@ -0,0 +1,107 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" + v1alpha1 "k8s.io/client-go/applyconfigurations/certificates/v1alpha1" + typedcertificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" + + typedkcpcertificatesv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// podCertificateRequestClusterClient implements PodCertificateRequestClusterInterface +type podCertificateRequestClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList] + Fake *kcptesting.Fake +} + +func newFakePodCertificateRequestClusterClient(fake *CertificatesV1alpha1ClusterClient) typedkcpcertificatesv1alpha1.PodCertificateRequestClusterInterface { + return &podCertificateRequestClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList]( + fake.Fake, + certificatesv1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"), + certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"), + func() *certificatesv1alpha1.PodCertificateRequest { + return &certificatesv1alpha1.PodCertificateRequest{} + }, + func() *certificatesv1alpha1.PodCertificateRequestList { + return &certificatesv1alpha1.PodCertificateRequestList{} + }, + func(dst, src *certificatesv1alpha1.PodCertificateRequestList) { dst.ListMeta = src.ListMeta }, + func(list *certificatesv1alpha1.PodCertificateRequestList) []*certificatesv1alpha1.PodCertificateRequest { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *certificatesv1alpha1.PodCertificateRequestList, items []*certificatesv1alpha1.PodCertificateRequest) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *podCertificateRequestClusterClient) Cluster(cluster logicalcluster.Path) typedkcpcertificatesv1alpha1.PodCertificateRequestsNamespacer { + return &podCertificateRequestNamespacer{Fake: c.Fake, ClusterPath: cluster} +} + +type podCertificateRequestNamespacer struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (n *podCertificateRequestNamespacer) Namespace(namespace string) typedcertificatesv1alpha1.PodCertificateRequestInterface { + return newFakePodCertificateRequestClient(n.Fake, namespace, n.ClusterPath) +} + +// podCertificateRequestScopedClient implements PodCertificateRequestInterface +type podCertificateRequestScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *v1alpha1.PodCertificateRequestApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakePodCertificateRequestClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedcertificatesv1alpha1.PodCertificateRequestInterface { + return &podCertificateRequestScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*certificatesv1alpha1.PodCertificateRequest, *certificatesv1alpha1.PodCertificateRequestList, *v1alpha1.PodCertificateRequestApplyConfiguration]( + fake, + clusterPath, + namespace, + certificatesv1alpha1.SchemeGroupVersion.WithResource("podcertificaterequests"), + certificatesv1alpha1.SchemeGroupVersion.WithKind("PodCertificateRequest"), + func() *certificatesv1alpha1.PodCertificateRequest { + return &certificatesv1alpha1.PodCertificateRequest{} + }, + func() *certificatesv1alpha1.PodCertificateRequestList { + return &certificatesv1alpha1.PodCertificateRequestList{} + }, + func(dst, src *certificatesv1alpha1.PodCertificateRequestList) { dst.ListMeta = src.ListMeta }, + func(list *certificatesv1alpha1.PodCertificateRequestList) []*certificatesv1alpha1.PodCertificateRequest { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *certificatesv1alpha1.PodCertificateRequestList, items []*certificatesv1alpha1.PodCertificateRequest) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go index 7e3e8577c36..d062fc14384 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/generated_expansion.go @@ -19,3 +19,5 @@ limitations under the License. package v1alpha1 type ClusterTrustBundleClusterExpansion interface{} + +type PodCertificateRequestClusterExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/podcertificaterequest.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/podcertificaterequest.go new file mode 100644 index 00000000000..c0571de70a5 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/certificates/v1alpha1/podcertificaterequest.go @@ -0,0 +1,83 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + watch "k8s.io/apimachinery/pkg/watch" + typedcertificatesv1alpha1 "k8s.io/client-go/kubernetes/typed/certificates/v1alpha1" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" +) + +// PodCertificateRequestsClusterGetter has a method to return a PodCertificateRequestClusterInterface. +// A group's cluster client should implement this interface. +type PodCertificateRequestsClusterGetter interface { + PodCertificateRequests() PodCertificateRequestClusterInterface +} + +// PodCertificateRequestClusterInterface can operate on PodCertificateRequests across all clusters, +// or scope down to one cluster and return a PodCertificateRequestsNamespacer. +type PodCertificateRequestClusterInterface interface { + Cluster(logicalcluster.Path) PodCertificateRequestsNamespacer + List(ctx context.Context, opts v1.ListOptions) (*certificatesv1alpha1.PodCertificateRequestList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + PodCertificateRequestClusterExpansion +} + +type podCertificateRequestsClusterInterface struct { + clientCache kcpclient.Cache[*typedcertificatesv1alpha1.CertificatesV1alpha1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *podCertificateRequestsClusterInterface) Cluster(clusterPath logicalcluster.Path) PodCertificateRequestsNamespacer { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return &podCertificateRequestsNamespacer{clientCache: c.clientCache, clusterPath: clusterPath} +} + +// List returns the entire collection of all PodCertificateRequests across all clusters. +func (c *podCertificateRequestsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*certificatesv1alpha1.PodCertificateRequestList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).PodCertificateRequests(v1.NamespaceAll).List(ctx, opts) +} + +// Watch begins to watch all PodCertificateRequests across all clusters. +func (c *podCertificateRequestsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).PodCertificateRequests(v1.NamespaceAll).Watch(ctx, opts) +} + +// PodCertificateRequestsNamespacer can scope to objects within a namespace, returning a typedcertificatesv1alpha1.PodCertificateRequestInterface. +type PodCertificateRequestsNamespacer interface { + Namespace(string) typedcertificatesv1alpha1.PodCertificateRequestInterface +} + +type podCertificateRequestsNamespacer struct { + clientCache kcpclient.Cache[*typedcertificatesv1alpha1.CertificatesV1alpha1Client] + clusterPath logicalcluster.Path +} + +func (n *podCertificateRequestsNamespacer) Namespace(namespace string) typedcertificatesv1alpha1.PodCertificateRequestInterface { + return n.clientCache.ClusterOrDie(n.clusterPath).PodCertificateRequests(namespace) +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/ipaddress.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/ipaddress.go deleted file mode 100644 index 38e66e98b76..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/ipaddress.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" - v1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - typednetworkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - - typedkcpnetworkingv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1" - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" -) - -// iPAddressClusterClient implements IPAddressClusterInterface -type iPAddressClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*networkingv1alpha1.IPAddress, *networkingv1alpha1.IPAddressList] - Fake *kcptesting.Fake -} - -func newFakeIPAddressClusterClient(fake *NetworkingV1alpha1ClusterClient) typedkcpnetworkingv1alpha1.IPAddressClusterInterface { - return &iPAddressClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*networkingv1alpha1.IPAddress, *networkingv1alpha1.IPAddressList]( - fake.Fake, - networkingv1alpha1.SchemeGroupVersion.WithResource("ipaddresses"), - networkingv1alpha1.SchemeGroupVersion.WithKind("IPAddress"), - func() *networkingv1alpha1.IPAddress { return &networkingv1alpha1.IPAddress{} }, - func() *networkingv1alpha1.IPAddressList { return &networkingv1alpha1.IPAddressList{} }, - func(dst, src *networkingv1alpha1.IPAddressList) { dst.ListMeta = src.ListMeta }, - func(list *networkingv1alpha1.IPAddressList) []*networkingv1alpha1.IPAddress { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *networkingv1alpha1.IPAddressList, items []*networkingv1alpha1.IPAddress) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *iPAddressClusterClient) Cluster(cluster logicalcluster.Path) typednetworkingv1alpha1.IPAddressInterface { - return newFakeIPAddressClient(c.Fake, cluster) -} - -// iPAddressScopedClient implements IPAddressInterface -type iPAddressScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*networkingv1alpha1.IPAddress, *networkingv1alpha1.IPAddressList, *v1alpha1.IPAddressApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeIPAddressClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typednetworkingv1alpha1.IPAddressInterface { - return &iPAddressScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*networkingv1alpha1.IPAddress, *networkingv1alpha1.IPAddressList, *v1alpha1.IPAddressApplyConfiguration]( - fake, - clusterPath, - "", - networkingv1alpha1.SchemeGroupVersion.WithResource("ipaddresses"), - networkingv1alpha1.SchemeGroupVersion.WithKind("IPAddress"), - func() *networkingv1alpha1.IPAddress { return &networkingv1alpha1.IPAddress{} }, - func() *networkingv1alpha1.IPAddressList { return &networkingv1alpha1.IPAddressList{} }, - func(dst, src *networkingv1alpha1.IPAddressList) { dst.ListMeta = src.ListMeta }, - func(list *networkingv1alpha1.IPAddressList) []*networkingv1alpha1.IPAddress { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *networkingv1alpha1.IPAddressList, items []*networkingv1alpha1.IPAddress) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/networking_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/networking_client.go deleted file mode 100644 index 49f290404e9..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/networking_client.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - rest "k8s.io/client-go/rest" - - kcpnetworkingv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" -) - -var _ kcpnetworkingv1alpha1.NetworkingV1alpha1ClusterInterface = (*NetworkingV1alpha1ClusterClient)(nil) - -type NetworkingV1alpha1ClusterClient struct { - *kcptesting.Fake -} - -func (c *NetworkingV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1.NetworkingV1alpha1Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return &NetworkingV1alpha1Client{Fake: c.Fake, ClusterPath: clusterPath} -} - -func (c *NetworkingV1alpha1ClusterClient) IPAddresses() kcpnetworkingv1alpha1.IPAddressClusterInterface { - return newFakeIPAddressClusterClient(c) -} - -func (c *NetworkingV1alpha1ClusterClient) ServiceCIDRs() kcpnetworkingv1alpha1.ServiceCIDRClusterInterface { - return newFakeServiceCIDRClusterClient(c) -} - -type NetworkingV1alpha1Client struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (c *NetworkingV1alpha1Client) IPAddresses() networkingv1alpha1.IPAddressInterface { - return newFakeIPAddressClient(c.Fake, c.ClusterPath) -} - -func (c *NetworkingV1alpha1Client) ServiceCIDRs() networkingv1alpha1.ServiceCIDRInterface { - return newFakeServiceCIDRClient(c.Fake, c.ClusterPath) -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *NetworkingV1alpha1Client) RESTClient() rest.Interface { - var ret *rest.RESTClient - return ret -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/servicecidr.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/servicecidr.go deleted file mode 100644 index 43c1f0abb86..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/servicecidr.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" - v1alpha1 "k8s.io/client-go/applyconfigurations/networking/v1alpha1" - typednetworkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - - typedkcpnetworkingv1alpha1 "github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1" - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" -) - -// serviceCIDRClusterClient implements ServiceCIDRClusterInterface -type serviceCIDRClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*networkingv1alpha1.ServiceCIDR, *networkingv1alpha1.ServiceCIDRList] - Fake *kcptesting.Fake -} - -func newFakeServiceCIDRClusterClient(fake *NetworkingV1alpha1ClusterClient) typedkcpnetworkingv1alpha1.ServiceCIDRClusterInterface { - return &serviceCIDRClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*networkingv1alpha1.ServiceCIDR, *networkingv1alpha1.ServiceCIDRList]( - fake.Fake, - networkingv1alpha1.SchemeGroupVersion.WithResource("servicecidrs"), - networkingv1alpha1.SchemeGroupVersion.WithKind("ServiceCIDR"), - func() *networkingv1alpha1.ServiceCIDR { return &networkingv1alpha1.ServiceCIDR{} }, - func() *networkingv1alpha1.ServiceCIDRList { return &networkingv1alpha1.ServiceCIDRList{} }, - func(dst, src *networkingv1alpha1.ServiceCIDRList) { dst.ListMeta = src.ListMeta }, - func(list *networkingv1alpha1.ServiceCIDRList) []*networkingv1alpha1.ServiceCIDR { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *networkingv1alpha1.ServiceCIDRList, items []*networkingv1alpha1.ServiceCIDR) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *serviceCIDRClusterClient) Cluster(cluster logicalcluster.Path) typednetworkingv1alpha1.ServiceCIDRInterface { - return newFakeServiceCIDRClient(c.Fake, cluster) -} - -// serviceCIDRScopedClient implements ServiceCIDRInterface -type serviceCIDRScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*networkingv1alpha1.ServiceCIDR, *networkingv1alpha1.ServiceCIDRList, *v1alpha1.ServiceCIDRApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeServiceCIDRClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typednetworkingv1alpha1.ServiceCIDRInterface { - return &serviceCIDRScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*networkingv1alpha1.ServiceCIDR, *networkingv1alpha1.ServiceCIDRList, *v1alpha1.ServiceCIDRApplyConfiguration]( - fake, - clusterPath, - "", - networkingv1alpha1.SchemeGroupVersion.WithResource("servicecidrs"), - networkingv1alpha1.SchemeGroupVersion.WithKind("ServiceCIDR"), - func() *networkingv1alpha1.ServiceCIDR { return &networkingv1alpha1.ServiceCIDR{} }, - func() *networkingv1alpha1.ServiceCIDRList { return &networkingv1alpha1.ServiceCIDRList{} }, - func(dst, src *networkingv1alpha1.ServiceCIDRList) { dst.ListMeta = src.ListMeta }, - func(list *networkingv1alpha1.ServiceCIDRList) []*networkingv1alpha1.ServiceCIDR { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *networkingv1alpha1.ServiceCIDRList, items []*networkingv1alpha1.ServiceCIDR) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go deleted file mode 100644 index 9fb81983899..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/ipaddress.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - apinetworkingv1alpha1 "k8s.io/api/networking/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" -) - -// IPAddressesClusterGetter has a method to return a IPAddressClusterInterface. -// A group's cluster client should implement this interface. -type IPAddressesClusterGetter interface { - IPAddresses() IPAddressClusterInterface -} - -// IPAddressClusterInterface can operate on IPAddresses across all clusters, -// or scope down to one cluster and return a networkingv1alpha1.IPAddressInterface. -type IPAddressClusterInterface interface { - Cluster(logicalcluster.Path) networkingv1alpha1.IPAddressInterface - List(ctx context.Context, opts v1.ListOptions) (*apinetworkingv1alpha1.IPAddressList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - IPAddressClusterExpansion -} - -type iPAddressesClusterInterface struct { - clientCache kcpclient.Cache[*networkingv1alpha1.NetworkingV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *iPAddressesClusterInterface) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1.IPAddressInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return c.clientCache.ClusterOrDie(clusterPath).IPAddresses() -} - -// List returns the entire collection of all IPAddresses across all clusters. -func (c *iPAddressesClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*apinetworkingv1alpha1.IPAddressList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).IPAddresses().List(ctx, opts) -} - -// Watch begins to watch all IPAddresses across all clusters. -func (c *iPAddressesClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).IPAddresses().Watch(ctx, opts) -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/networking_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/networking_client.go deleted file mode 100644 index f33aec75a41..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/networking_client.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - http "net/http" - - apinetworkingv1alpha1 "k8s.io/api/networking/v1alpha1" - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - rest "k8s.io/client-go/rest" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - kcpscheme "github.com/kcp-dev/client-go/kubernetes/scheme" - "github.com/kcp-dev/logicalcluster/v3" -) - -type NetworkingV1alpha1ClusterInterface interface { - NetworkingV1alpha1ClusterScoper - IPAddressesClusterGetter - ServiceCIDRsClusterGetter -} - -type NetworkingV1alpha1ClusterScoper interface { - Cluster(logicalcluster.Path) networkingv1alpha1.NetworkingV1alpha1Interface -} - -// NetworkingV1alpha1ClusterClient is used to interact with features provided by the networking.k8s.io group. -type NetworkingV1alpha1ClusterClient struct { - clientCache kcpclient.Cache[*networkingv1alpha1.NetworkingV1alpha1Client] -} - -func (c *NetworkingV1alpha1ClusterClient) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1.NetworkingV1alpha1Interface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - return c.clientCache.ClusterOrDie(clusterPath) -} - -func (c *NetworkingV1alpha1ClusterClient) IPAddresses() IPAddressClusterInterface { - return &iPAddressesClusterInterface{clientCache: c.clientCache} -} - -func (c *NetworkingV1alpha1ClusterClient) ServiceCIDRs() ServiceCIDRClusterInterface { - return &serviceCIDRsClusterInterface{clientCache: c.clientCache} -} - -// NewForConfig creates a new NetworkingV1alpha1ClusterClient for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*NetworkingV1alpha1ClusterClient, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new NetworkingV1alpha1ClusterClient for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1alpha1ClusterClient, error) { - cache := kcpclient.NewCache(c, h, &kcpclient.Constructor[*networkingv1alpha1.NetworkingV1alpha1Client]{ - NewForConfigAndClient: networkingv1alpha1.NewForConfigAndClient, - }) - if _, err := cache.Cluster(logicalcluster.Name("root").Path()); err != nil { - return nil, err - } - - return &NetworkingV1alpha1ClusterClient{clientCache: cache}, nil -} - -// NewForConfigOrDie creates a new NetworkingV1alpha1ClusterClient for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *NetworkingV1alpha1ClusterClient { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -func setConfigDefaults(config *rest.Config) { - gv := apinetworkingv1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(kcpscheme.Scheme, kcpscheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go deleted file mode 100644 index 80ad0abf532..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/servicecidr.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - apinetworkingv1alpha1 "k8s.io/api/networking/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - watch "k8s.io/apimachinery/pkg/watch" - networkingv1alpha1 "k8s.io/client-go/kubernetes/typed/networking/v1alpha1" - - kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" - "github.com/kcp-dev/logicalcluster/v3" -) - -// ServiceCIDRsClusterGetter has a method to return a ServiceCIDRClusterInterface. -// A group's cluster client should implement this interface. -type ServiceCIDRsClusterGetter interface { - ServiceCIDRs() ServiceCIDRClusterInterface -} - -// ServiceCIDRClusterInterface can operate on ServiceCIDRs across all clusters, -// or scope down to one cluster and return a networkingv1alpha1.ServiceCIDRInterface. -type ServiceCIDRClusterInterface interface { - Cluster(logicalcluster.Path) networkingv1alpha1.ServiceCIDRInterface - List(ctx context.Context, opts v1.ListOptions) (*apinetworkingv1alpha1.ServiceCIDRList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - ServiceCIDRClusterExpansion -} - -type serviceCIDRsClusterInterface struct { - clientCache kcpclient.Cache[*networkingv1alpha1.NetworkingV1alpha1Client] -} - -// Cluster scopes the client down to a particular cluster. -func (c *serviceCIDRsClusterInterface) Cluster(clusterPath logicalcluster.Path) networkingv1alpha1.ServiceCIDRInterface { - if clusterPath == logicalcluster.Wildcard { - panic("A specific cluster must be provided when scoping, not the wildcard.") - } - - return c.clientCache.ClusterOrDie(clusterPath).ServiceCIDRs() -} - -// List returns the entire collection of all ServiceCIDRs across all clusters. -func (c *serviceCIDRsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*apinetworkingv1alpha1.ServiceCIDRList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ServiceCIDRs().List(ctx, opts) -} - -// Watch begins to watch all ServiceCIDRs across all clusters. -func (c *serviceCIDRsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ServiceCIDRs().Watch(ctx, opts) -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/deviceclass.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/deviceclass.go similarity index 72% rename from staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/deviceclass.go rename to staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/deviceclass.go index 339e379cfb5..2200edfc098 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/deviceclass.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/deviceclass.go @@ -16,15 +16,15 @@ limitations under the License. // Code generated by cluster-client-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" - apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiresourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" + resourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" "github.com/kcp-dev/logicalcluster/v3" @@ -37,20 +37,20 @@ type DeviceClassesClusterGetter interface { } // DeviceClassClusterInterface can operate on DeviceClasses across all clusters, -// or scope down to one cluster and return a resourcev1alpha3.DeviceClassInterface. +// or scope down to one cluster and return a resourcev1.DeviceClassInterface. type DeviceClassClusterInterface interface { - Cluster(logicalcluster.Path) resourcev1alpha3.DeviceClassInterface - List(ctx context.Context, opts v1.ListOptions) (*apiresourcev1alpha3.DeviceClassList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Cluster(logicalcluster.Path) resourcev1.DeviceClassInterface + List(ctx context.Context, opts metav1.ListOptions) (*apiresourcev1.DeviceClassList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) DeviceClassClusterExpansion } type deviceClassesClusterInterface struct { - clientCache kcpclient.Cache[*resourcev1alpha3.ResourceV1alpha3Client] + clientCache kcpclient.Cache[*resourcev1.ResourceV1Client] } // Cluster scopes the client down to a particular cluster. -func (c *deviceClassesClusterInterface) Cluster(clusterPath logicalcluster.Path) resourcev1alpha3.DeviceClassInterface { +func (c *deviceClassesClusterInterface) Cluster(clusterPath logicalcluster.Path) resourcev1.DeviceClassInterface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } @@ -59,11 +59,11 @@ func (c *deviceClassesClusterInterface) Cluster(clusterPath logicalcluster.Path) } // List returns the entire collection of all DeviceClasses across all clusters. -func (c *deviceClassesClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*apiresourcev1alpha3.DeviceClassList, error) { +func (c *deviceClassesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*apiresourcev1.DeviceClassList, error) { return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).DeviceClasses().List(ctx, opts) } // Watch begins to watch all DeviceClasses across all clusters. -func (c *deviceClassesClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *deviceClassesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).DeviceClasses().Watch(ctx, opts) } diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/doc.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/doc.go similarity index 97% rename from staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/doc.go rename to staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/doc.go index 08b80237c8a..d2f3412ab21 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/doc.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/doc.go @@ -17,4 +17,4 @@ limitations under the License. // Code generated by cluster-client-gen. DO NOT EDIT. // This package has the automatically generated typed clients. -package v1alpha1 +package v1 diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/deviceclass.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/deviceclass.go new file mode 100644 index 00000000000..57202eae70c --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/deviceclass.go @@ -0,0 +1,90 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + resourcev1 "k8s.io/api/resource/v1" + v1 "k8s.io/client-go/applyconfigurations/resource/v1" + typedresourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" + + typedkcpresourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// deviceClassClusterClient implements DeviceClassClusterInterface +type deviceClassClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*resourcev1.DeviceClass, *resourcev1.DeviceClassList] + Fake *kcptesting.Fake +} + +func newFakeDeviceClassClusterClient(fake *ResourceV1ClusterClient) typedkcpresourcev1.DeviceClassClusterInterface { + return &deviceClassClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*resourcev1.DeviceClass, *resourcev1.DeviceClassList]( + fake.Fake, + resourcev1.SchemeGroupVersion.WithResource("deviceclasses"), + resourcev1.SchemeGroupVersion.WithKind("DeviceClass"), + func() *resourcev1.DeviceClass { return &resourcev1.DeviceClass{} }, + func() *resourcev1.DeviceClassList { return &resourcev1.DeviceClassList{} }, + func(dst, src *resourcev1.DeviceClassList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.DeviceClassList) []*resourcev1.DeviceClass { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.DeviceClassList, items []*resourcev1.DeviceClass) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *deviceClassClusterClient) Cluster(cluster logicalcluster.Path) typedresourcev1.DeviceClassInterface { + return newFakeDeviceClassClient(c.Fake, cluster) +} + +// deviceClassScopedClient implements DeviceClassInterface +type deviceClassScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*resourcev1.DeviceClass, *resourcev1.DeviceClassList, *v1.DeviceClassApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakeDeviceClassClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedresourcev1.DeviceClassInterface { + return &deviceClassScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*resourcev1.DeviceClass, *resourcev1.DeviceClassList, *v1.DeviceClassApplyConfiguration]( + fake, + clusterPath, + "", + resourcev1.SchemeGroupVersion.WithResource("deviceclasses"), + resourcev1.SchemeGroupVersion.WithKind("DeviceClass"), + func() *resourcev1.DeviceClass { return &resourcev1.DeviceClass{} }, + func() *resourcev1.DeviceClassList { return &resourcev1.DeviceClassList{} }, + func(dst, src *resourcev1.DeviceClassList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.DeviceClassList) []*resourcev1.DeviceClass { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.DeviceClassList, items []*resourcev1.DeviceClass) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/doc.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/doc.go similarity index 100% rename from staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/fake/doc.go rename to staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/doc.go diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resource_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resource_client.go new file mode 100644 index 00000000000..ad2c13dd5de --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resource_client.go @@ -0,0 +1,85 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + resourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" + rest "k8s.io/client-go/rest" + + kcpresourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +var _ kcpresourcev1.ResourceV1ClusterInterface = (*ResourceV1ClusterClient)(nil) + +type ResourceV1ClusterClient struct { + *kcptesting.Fake +} + +func (c *ResourceV1ClusterClient) Cluster(clusterPath logicalcluster.Path) resourcev1.ResourceV1Interface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + return &ResourceV1Client{Fake: c.Fake, ClusterPath: clusterPath} +} + +func (c *ResourceV1ClusterClient) DeviceClasses() kcpresourcev1.DeviceClassClusterInterface { + return newFakeDeviceClassClusterClient(c) +} + +func (c *ResourceV1ClusterClient) ResourceClaims() kcpresourcev1.ResourceClaimClusterInterface { + return newFakeResourceClaimClusterClient(c) +} + +func (c *ResourceV1ClusterClient) ResourceClaimTemplates() kcpresourcev1.ResourceClaimTemplateClusterInterface { + return newFakeResourceClaimTemplateClusterClient(c) +} + +func (c *ResourceV1ClusterClient) ResourceSlices() kcpresourcev1.ResourceSliceClusterInterface { + return newFakeResourceSliceClusterClient(c) +} + +type ResourceV1Client struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (c *ResourceV1Client) DeviceClasses() resourcev1.DeviceClassInterface { + return newFakeDeviceClassClient(c.Fake, c.ClusterPath) +} + +func (c *ResourceV1Client) ResourceClaims(namespace string) resourcev1.ResourceClaimInterface { + return newFakeResourceClaimClient(c.Fake, namespace, c.ClusterPath) +} + +func (c *ResourceV1Client) ResourceClaimTemplates(namespace string) resourcev1.ResourceClaimTemplateInterface { + return newFakeResourceClaimTemplateClient(c.Fake, namespace, c.ClusterPath) +} + +func (c *ResourceV1Client) ResourceSlices() resourcev1.ResourceSliceInterface { + return newFakeResourceSliceClient(c.Fake, c.ClusterPath) +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *ResourceV1Client) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceclaim.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceclaim.go new file mode 100644 index 00000000000..241094b4aa2 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceclaim.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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + resourcev1 "k8s.io/api/resource/v1" + v1 "k8s.io/client-go/applyconfigurations/resource/v1" + typedresourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" + + typedkcpresourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// resourceClaimClusterClient implements ResourceClaimClusterInterface +type resourceClaimClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*resourcev1.ResourceClaim, *resourcev1.ResourceClaimList] + Fake *kcptesting.Fake +} + +func newFakeResourceClaimClusterClient(fake *ResourceV1ClusterClient) typedkcpresourcev1.ResourceClaimClusterInterface { + return &resourceClaimClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*resourcev1.ResourceClaim, *resourcev1.ResourceClaimList]( + fake.Fake, + resourcev1.SchemeGroupVersion.WithResource("resourceclaims"), + resourcev1.SchemeGroupVersion.WithKind("ResourceClaim"), + func() *resourcev1.ResourceClaim { return &resourcev1.ResourceClaim{} }, + func() *resourcev1.ResourceClaimList { return &resourcev1.ResourceClaimList{} }, + func(dst, src *resourcev1.ResourceClaimList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.ResourceClaimList) []*resourcev1.ResourceClaim { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.ResourceClaimList, items []*resourcev1.ResourceClaim) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *resourceClaimClusterClient) Cluster(cluster logicalcluster.Path) typedkcpresourcev1.ResourceClaimsNamespacer { + return &resourceClaimNamespacer{Fake: c.Fake, ClusterPath: cluster} +} + +type resourceClaimNamespacer struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (n *resourceClaimNamespacer) Namespace(namespace string) typedresourcev1.ResourceClaimInterface { + return newFakeResourceClaimClient(n.Fake, namespace, n.ClusterPath) +} + +// resourceClaimScopedClient implements ResourceClaimInterface +type resourceClaimScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*resourcev1.ResourceClaim, *resourcev1.ResourceClaimList, *v1.ResourceClaimApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakeResourceClaimClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedresourcev1.ResourceClaimInterface { + return &resourceClaimScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*resourcev1.ResourceClaim, *resourcev1.ResourceClaimList, *v1.ResourceClaimApplyConfiguration]( + fake, + clusterPath, + namespace, + resourcev1.SchemeGroupVersion.WithResource("resourceclaims"), + resourcev1.SchemeGroupVersion.WithKind("ResourceClaim"), + func() *resourcev1.ResourceClaim { return &resourcev1.ResourceClaim{} }, + func() *resourcev1.ResourceClaimList { return &resourcev1.ResourceClaimList{} }, + func(dst, src *resourcev1.ResourceClaimList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.ResourceClaimList) []*resourcev1.ResourceClaim { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.ResourceClaimList, items []*resourcev1.ResourceClaim) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceclaimtemplate.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceclaimtemplate.go new file mode 100644 index 00000000000..02823494f98 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceclaimtemplate.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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + resourcev1 "k8s.io/api/resource/v1" + v1 "k8s.io/client-go/applyconfigurations/resource/v1" + typedresourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" + + typedkcpresourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// resourceClaimTemplateClusterClient implements ResourceClaimTemplateClusterInterface +type resourceClaimTemplateClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*resourcev1.ResourceClaimTemplate, *resourcev1.ResourceClaimTemplateList] + Fake *kcptesting.Fake +} + +func newFakeResourceClaimTemplateClusterClient(fake *ResourceV1ClusterClient) typedkcpresourcev1.ResourceClaimTemplateClusterInterface { + return &resourceClaimTemplateClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*resourcev1.ResourceClaimTemplate, *resourcev1.ResourceClaimTemplateList]( + fake.Fake, + resourcev1.SchemeGroupVersion.WithResource("resourceclaimtemplates"), + resourcev1.SchemeGroupVersion.WithKind("ResourceClaimTemplate"), + func() *resourcev1.ResourceClaimTemplate { return &resourcev1.ResourceClaimTemplate{} }, + func() *resourcev1.ResourceClaimTemplateList { return &resourcev1.ResourceClaimTemplateList{} }, + func(dst, src *resourcev1.ResourceClaimTemplateList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.ResourceClaimTemplateList) []*resourcev1.ResourceClaimTemplate { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.ResourceClaimTemplateList, items []*resourcev1.ResourceClaimTemplate) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *resourceClaimTemplateClusterClient) Cluster(cluster logicalcluster.Path) typedkcpresourcev1.ResourceClaimTemplatesNamespacer { + return &resourceClaimTemplateNamespacer{Fake: c.Fake, ClusterPath: cluster} +} + +type resourceClaimTemplateNamespacer struct { + *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func (n *resourceClaimTemplateNamespacer) Namespace(namespace string) typedresourcev1.ResourceClaimTemplateInterface { + return newFakeResourceClaimTemplateClient(n.Fake, namespace, n.ClusterPath) +} + +// resourceClaimTemplateScopedClient implements ResourceClaimTemplateInterface +type resourceClaimTemplateScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*resourcev1.ResourceClaimTemplate, *resourcev1.ResourceClaimTemplateList, *v1.ResourceClaimTemplateApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakeResourceClaimTemplateClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedresourcev1.ResourceClaimTemplateInterface { + return &resourceClaimTemplateScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*resourcev1.ResourceClaimTemplate, *resourcev1.ResourceClaimTemplateList, *v1.ResourceClaimTemplateApplyConfiguration]( + fake, + clusterPath, + namespace, + resourcev1.SchemeGroupVersion.WithResource("resourceclaimtemplates"), + resourcev1.SchemeGroupVersion.WithKind("ResourceClaimTemplate"), + func() *resourcev1.ResourceClaimTemplate { return &resourcev1.ResourceClaimTemplate{} }, + func() *resourcev1.ResourceClaimTemplateList { return &resourcev1.ResourceClaimTemplateList{} }, + func(dst, src *resourcev1.ResourceClaimTemplateList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.ResourceClaimTemplateList) []*resourcev1.ResourceClaimTemplate { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.ResourceClaimTemplateList, items []*resourcev1.ResourceClaimTemplate) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceslice.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceslice.go new file mode 100644 index 00000000000..a896db99fb7 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/fake/resourceslice.go @@ -0,0 +1,90 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + resourcev1 "k8s.io/api/resource/v1" + v1 "k8s.io/client-go/applyconfigurations/resource/v1" + typedresourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" + + typedkcpresourcev1 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// resourceSliceClusterClient implements ResourceSliceClusterInterface +type resourceSliceClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*resourcev1.ResourceSlice, *resourcev1.ResourceSliceList] + Fake *kcptesting.Fake +} + +func newFakeResourceSliceClusterClient(fake *ResourceV1ClusterClient) typedkcpresourcev1.ResourceSliceClusterInterface { + return &resourceSliceClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*resourcev1.ResourceSlice, *resourcev1.ResourceSliceList]( + fake.Fake, + resourcev1.SchemeGroupVersion.WithResource("resourceslices"), + resourcev1.SchemeGroupVersion.WithKind("ResourceSlice"), + func() *resourcev1.ResourceSlice { return &resourcev1.ResourceSlice{} }, + func() *resourcev1.ResourceSliceList { return &resourcev1.ResourceSliceList{} }, + func(dst, src *resourcev1.ResourceSliceList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.ResourceSliceList) []*resourcev1.ResourceSlice { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.ResourceSliceList, items []*resourcev1.ResourceSlice) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *resourceSliceClusterClient) Cluster(cluster logicalcluster.Path) typedresourcev1.ResourceSliceInterface { + return newFakeResourceSliceClient(c.Fake, cluster) +} + +// resourceSliceScopedClient implements ResourceSliceInterface +type resourceSliceScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*resourcev1.ResourceSlice, *resourcev1.ResourceSliceList, *v1.ResourceSliceApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakeResourceSliceClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedresourcev1.ResourceSliceInterface { + return &resourceSliceScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*resourcev1.ResourceSlice, *resourcev1.ResourceSliceList, *v1.ResourceSliceApplyConfiguration]( + fake, + clusterPath, + "", + resourcev1.SchemeGroupVersion.WithResource("resourceslices"), + resourcev1.SchemeGroupVersion.WithKind("ResourceSlice"), + func() *resourcev1.ResourceSlice { return &resourcev1.ResourceSlice{} }, + func() *resourcev1.ResourceSliceList { return &resourcev1.ResourceSliceList{} }, + func(dst, src *resourcev1.ResourceSliceList) { dst.ListMeta = src.ListMeta }, + func(list *resourcev1.ResourceSliceList) []*resourcev1.ResourceSlice { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *resourcev1.ResourceSliceList, items []*resourcev1.ResourceSlice) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/generated_expansion.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/generated_expansion.go similarity index 75% rename from staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/generated_expansion.go rename to staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/generated_expansion.go index 2c80d7e71bf..21a19acf2b5 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/networking/v1alpha1/generated_expansion.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/generated_expansion.go @@ -16,8 +16,12 @@ limitations under the License. // Code generated by cluster-client-gen. DO NOT EDIT. -package v1alpha1 +package v1 -type IPAddressClusterExpansion interface{} +type DeviceClassClusterExpansion interface{} -type ServiceCIDRClusterExpansion interface{} +type ResourceClaimClusterExpansion interface{} + +type ResourceClaimTemplateClusterExpansion interface{} + +type ResourceSliceClusterExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resource_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resource_client.go new file mode 100644 index 00000000000..5f70311bb92 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resource_client.go @@ -0,0 +1,118 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package v1 + +import ( + http "net/http" + + apiresourcev1 "k8s.io/api/resource/v1" + resourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" + rest "k8s.io/client-go/rest" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + kcpscheme "github.com/kcp-dev/client-go/kubernetes/scheme" + "github.com/kcp-dev/logicalcluster/v3" +) + +type ResourceV1ClusterInterface interface { + ResourceV1ClusterScoper + DeviceClassesClusterGetter + ResourceClaimsClusterGetter + ResourceClaimTemplatesClusterGetter + ResourceSlicesClusterGetter +} + +type ResourceV1ClusterScoper interface { + Cluster(logicalcluster.Path) resourcev1.ResourceV1Interface +} + +// ResourceV1ClusterClient is used to interact with features provided by the resource.k8s.io group. +type ResourceV1ClusterClient struct { + clientCache kcpclient.Cache[*resourcev1.ResourceV1Client] +} + +func (c *ResourceV1ClusterClient) Cluster(clusterPath logicalcluster.Path) resourcev1.ResourceV1Interface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + return c.clientCache.ClusterOrDie(clusterPath) +} + +func (c *ResourceV1ClusterClient) DeviceClasses() DeviceClassClusterInterface { + return &deviceClassesClusterInterface{clientCache: c.clientCache} +} + +func (c *ResourceV1ClusterClient) ResourceClaims() ResourceClaimClusterInterface { + return &resourceClaimsClusterInterface{clientCache: c.clientCache} +} + +func (c *ResourceV1ClusterClient) ResourceClaimTemplates() ResourceClaimTemplateClusterInterface { + return &resourceClaimTemplatesClusterInterface{clientCache: c.clientCache} +} + +func (c *ResourceV1ClusterClient) ResourceSlices() ResourceSliceClusterInterface { + return &resourceSlicesClusterInterface{clientCache: c.clientCache} +} + +// NewForConfig creates a new ResourceV1ClusterClient for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*ResourceV1ClusterClient, error) { + config := *c + setConfigDefaults(&config) + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new ResourceV1ClusterClient for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ResourceV1ClusterClient, error) { + cache := kcpclient.NewCache(c, h, &kcpclient.Constructor[*resourcev1.ResourceV1Client]{ + NewForConfigAndClient: resourcev1.NewForConfigAndClient, + }) + if _, err := cache.Cluster(logicalcluster.Name("root").Path()); err != nil { + return nil, err + } + + return &ResourceV1ClusterClient{clientCache: cache}, nil +} + +// NewForConfigOrDie creates a new ResourceV1ClusterClient for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *ResourceV1ClusterClient { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +func setConfigDefaults(config *rest.Config) { + gv := apiresourcev1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(kcpscheme.Scheme, kcpscheme.Codecs).WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceclaim.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceclaim.go similarity index 73% rename from staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceclaim.go rename to staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceclaim.go index 3be00cf53e4..04bd8958eb1 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceclaim.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceclaim.go @@ -16,15 +16,15 @@ limitations under the License. // Code generated by cluster-client-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + resourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" - typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" + typedresourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" "github.com/kcp-dev/logicalcluster/v3" @@ -40,13 +40,13 @@ type ResourceClaimsClusterGetter interface { // or scope down to one cluster and return a ResourceClaimsNamespacer. type ResourceClaimClusterInterface interface { Cluster(logicalcluster.Path) ResourceClaimsNamespacer - List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourceClaimList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + List(ctx context.Context, opts metav1.ListOptions) (*resourcev1.ResourceClaimList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) ResourceClaimClusterExpansion } type resourceClaimsClusterInterface struct { - clientCache kcpclient.Cache[*typedresourcev1alpha3.ResourceV1alpha3Client] + clientCache kcpclient.Cache[*typedresourcev1.ResourceV1Client] } // Cluster scopes the client down to a particular cluster. @@ -59,25 +59,25 @@ func (c *resourceClaimsClusterInterface) Cluster(clusterPath logicalcluster.Path } // List returns the entire collection of all ResourceClaims across all clusters. -func (c *resourceClaimsClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourceClaimList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaims(v1.NamespaceAll).List(ctx, opts) +func (c *resourceClaimsClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1.ResourceClaimList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaims(metav1.NamespaceAll).List(ctx, opts) } // Watch begins to watch all ResourceClaims across all clusters. -func (c *resourceClaimsClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaims(v1.NamespaceAll).Watch(ctx, opts) +func (c *resourceClaimsClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaims(metav1.NamespaceAll).Watch(ctx, opts) } -// ResourceClaimsNamespacer can scope to objects within a namespace, returning a typedresourcev1alpha3.ResourceClaimInterface. +// ResourceClaimsNamespacer can scope to objects within a namespace, returning a typedresourcev1.ResourceClaimInterface. type ResourceClaimsNamespacer interface { - Namespace(string) typedresourcev1alpha3.ResourceClaimInterface + Namespace(string) typedresourcev1.ResourceClaimInterface } type resourceClaimsNamespacer struct { - clientCache kcpclient.Cache[*typedresourcev1alpha3.ResourceV1alpha3Client] + clientCache kcpclient.Cache[*typedresourcev1.ResourceV1Client] clusterPath logicalcluster.Path } -func (n *resourceClaimsNamespacer) Namespace(namespace string) typedresourcev1alpha3.ResourceClaimInterface { +func (n *resourceClaimsNamespacer) Namespace(namespace string) typedresourcev1.ResourceClaimInterface { return n.clientCache.ClusterOrDie(n.clusterPath).ResourceClaims(namespace) } diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimtemplate.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceclaimtemplate.go similarity index 73% rename from staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimtemplate.go rename to staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceclaimtemplate.go index 307dea8f30b..85bd6e02f31 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceclaimtemplate.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceclaimtemplate.go @@ -16,15 +16,15 @@ limitations under the License. // Code generated by cluster-client-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + resourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" - typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" + typedresourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" "github.com/kcp-dev/logicalcluster/v3" @@ -40,13 +40,13 @@ type ResourceClaimTemplatesClusterGetter interface { // or scope down to one cluster and return a ResourceClaimTemplatesNamespacer. type ResourceClaimTemplateClusterInterface interface { Cluster(logicalcluster.Path) ResourceClaimTemplatesNamespacer - List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourceClaimTemplateList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + List(ctx context.Context, opts metav1.ListOptions) (*resourcev1.ResourceClaimTemplateList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) ResourceClaimTemplateClusterExpansion } type resourceClaimTemplatesClusterInterface struct { - clientCache kcpclient.Cache[*typedresourcev1alpha3.ResourceV1alpha3Client] + clientCache kcpclient.Cache[*typedresourcev1.ResourceV1Client] } // Cluster scopes the client down to a particular cluster. @@ -59,25 +59,25 @@ func (c *resourceClaimTemplatesClusterInterface) Cluster(clusterPath logicalclus } // List returns the entire collection of all ResourceClaimTemplates across all clusters. -func (c *resourceClaimTemplatesClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*resourcev1alpha3.ResourceClaimTemplateList, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaimTemplates(v1.NamespaceAll).List(ctx, opts) +func (c *resourceClaimTemplatesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*resourcev1.ResourceClaimTemplateList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaimTemplates(metav1.NamespaceAll).List(ctx, opts) } // Watch begins to watch all ResourceClaimTemplates across all clusters. -func (c *resourceClaimTemplatesClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaimTemplates(v1.NamespaceAll).Watch(ctx, opts) +func (c *resourceClaimTemplatesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceClaimTemplates(metav1.NamespaceAll).Watch(ctx, opts) } -// ResourceClaimTemplatesNamespacer can scope to objects within a namespace, returning a typedresourcev1alpha3.ResourceClaimTemplateInterface. +// ResourceClaimTemplatesNamespacer can scope to objects within a namespace, returning a typedresourcev1.ResourceClaimTemplateInterface. type ResourceClaimTemplatesNamespacer interface { - Namespace(string) typedresourcev1alpha3.ResourceClaimTemplateInterface + Namespace(string) typedresourcev1.ResourceClaimTemplateInterface } type resourceClaimTemplatesNamespacer struct { - clientCache kcpclient.Cache[*typedresourcev1alpha3.ResourceV1alpha3Client] + clientCache kcpclient.Cache[*typedresourcev1.ResourceV1Client] clusterPath logicalcluster.Path } -func (n *resourceClaimTemplatesNamespacer) Namespace(namespace string) typedresourcev1alpha3.ResourceClaimTemplateInterface { +func (n *resourceClaimTemplatesNamespacer) Namespace(namespace string) typedresourcev1.ResourceClaimTemplateInterface { return n.clientCache.ClusterOrDie(n.clusterPath).ResourceClaimTemplates(namespace) } diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceslice.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceslice.go similarity index 72% rename from staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceslice.go rename to staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceslice.go index 7d9cb6e2893..d3db11936c9 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resourceslice.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1/resourceslice.go @@ -16,15 +16,15 @@ limitations under the License. // Code generated by cluster-client-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( context "context" - apiresourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + apiresourcev1 "k8s.io/api/resource/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" watch "k8s.io/apimachinery/pkg/watch" - resourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" + resourcev1 "k8s.io/client-go/kubernetes/typed/resource/v1" kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" "github.com/kcp-dev/logicalcluster/v3" @@ -37,20 +37,20 @@ type ResourceSlicesClusterGetter interface { } // ResourceSliceClusterInterface can operate on ResourceSlices across all clusters, -// or scope down to one cluster and return a resourcev1alpha3.ResourceSliceInterface. +// or scope down to one cluster and return a resourcev1.ResourceSliceInterface. type ResourceSliceClusterInterface interface { - Cluster(logicalcluster.Path) resourcev1alpha3.ResourceSliceInterface - List(ctx context.Context, opts v1.ListOptions) (*apiresourcev1alpha3.ResourceSliceList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Cluster(logicalcluster.Path) resourcev1.ResourceSliceInterface + List(ctx context.Context, opts metav1.ListOptions) (*apiresourcev1.ResourceSliceList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) ResourceSliceClusterExpansion } type resourceSlicesClusterInterface struct { - clientCache kcpclient.Cache[*resourcev1alpha3.ResourceV1alpha3Client] + clientCache kcpclient.Cache[*resourcev1.ResourceV1Client] } // Cluster scopes the client down to a particular cluster. -func (c *resourceSlicesClusterInterface) Cluster(clusterPath logicalcluster.Path) resourcev1alpha3.ResourceSliceInterface { +func (c *resourceSlicesClusterInterface) Cluster(clusterPath logicalcluster.Path) resourcev1.ResourceSliceInterface { if clusterPath == logicalcluster.Wildcard { panic("A specific cluster must be provided when scoping, not the wildcard.") } @@ -59,11 +59,11 @@ func (c *resourceSlicesClusterInterface) Cluster(clusterPath logicalcluster.Path } // List returns the entire collection of all ResourceSlices across all clusters. -func (c *resourceSlicesClusterInterface) List(ctx context.Context, opts v1.ListOptions) (*apiresourcev1alpha3.ResourceSliceList, error) { +func (c *resourceSlicesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*apiresourcev1.ResourceSliceList, error) { return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceSlices().List(ctx, opts) } // Watch begins to watch all ResourceSlices across all clusters. -func (c *resourceSlicesClusterInterface) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { +func (c *resourceSlicesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).ResourceSlices().Watch(ctx, opts) } diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/deviceclass.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/deviceclass.go deleted file mode 100644 index ab0c771cfee..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/deviceclass.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" - - typedkcpresourcev1alpha3 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3" - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" -) - -// deviceClassClusterClient implements DeviceClassClusterInterface -type deviceClassClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList] - Fake *kcptesting.Fake -} - -func newFakeDeviceClassClusterClient(fake *ResourceV1alpha3ClusterClient) typedkcpresourcev1alpha3.DeviceClassClusterInterface { - return &deviceClassClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList]( - fake.Fake, - resourcev1alpha3.SchemeGroupVersion.WithResource("deviceclasses"), - resourcev1alpha3.SchemeGroupVersion.WithKind("DeviceClass"), - func() *resourcev1alpha3.DeviceClass { return &resourcev1alpha3.DeviceClass{} }, - func() *resourcev1alpha3.DeviceClassList { return &resourcev1alpha3.DeviceClassList{} }, - func(dst, src *resourcev1alpha3.DeviceClassList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.DeviceClassList) []*resourcev1alpha3.DeviceClass { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.DeviceClassList, items []*resourcev1alpha3.DeviceClass) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *deviceClassClusterClient) Cluster(cluster logicalcluster.Path) typedresourcev1alpha3.DeviceClassInterface { - return newFakeDeviceClassClient(c.Fake, cluster) -} - -// deviceClassScopedClient implements DeviceClassInterface -type deviceClassScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList, *v1alpha3.DeviceClassApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeDeviceClassClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedresourcev1alpha3.DeviceClassInterface { - return &deviceClassScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*resourcev1alpha3.DeviceClass, *resourcev1alpha3.DeviceClassList, *v1alpha3.DeviceClassApplyConfiguration]( - fake, - clusterPath, - "", - resourcev1alpha3.SchemeGroupVersion.WithResource("deviceclasses"), - resourcev1alpha3.SchemeGroupVersion.WithKind("DeviceClass"), - func() *resourcev1alpha3.DeviceClass { return &resourcev1alpha3.DeviceClass{} }, - func() *resourcev1alpha3.DeviceClassList { return &resourcev1alpha3.DeviceClassList{} }, - func(dst, src *resourcev1alpha3.DeviceClassList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.DeviceClassList) []*resourcev1alpha3.DeviceClass { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.DeviceClassList, items []*resourcev1alpha3.DeviceClass) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resource_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resource_client.go index bef95d07622..b13ead33d2a 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resource_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resource_client.go @@ -40,51 +40,19 @@ func (c *ResourceV1alpha3ClusterClient) Cluster(clusterPath logicalcluster.Path) return &ResourceV1alpha3Client{Fake: c.Fake, ClusterPath: clusterPath} } -func (c *ResourceV1alpha3ClusterClient) DeviceClasses() kcpresourcev1alpha3.DeviceClassClusterInterface { - return newFakeDeviceClassClusterClient(c) -} - func (c *ResourceV1alpha3ClusterClient) DeviceTaintRules() kcpresourcev1alpha3.DeviceTaintRuleClusterInterface { return newFakeDeviceTaintRuleClusterClient(c) } -func (c *ResourceV1alpha3ClusterClient) ResourceClaims() kcpresourcev1alpha3.ResourceClaimClusterInterface { - return newFakeResourceClaimClusterClient(c) -} - -func (c *ResourceV1alpha3ClusterClient) ResourceClaimTemplates() kcpresourcev1alpha3.ResourceClaimTemplateClusterInterface { - return newFakeResourceClaimTemplateClusterClient(c) -} - -func (c *ResourceV1alpha3ClusterClient) ResourceSlices() kcpresourcev1alpha3.ResourceSliceClusterInterface { - return newFakeResourceSliceClusterClient(c) -} - type ResourceV1alpha3Client struct { *kcptesting.Fake ClusterPath logicalcluster.Path } -func (c *ResourceV1alpha3Client) DeviceClasses() resourcev1alpha3.DeviceClassInterface { - return newFakeDeviceClassClient(c.Fake, c.ClusterPath) -} - func (c *ResourceV1alpha3Client) DeviceTaintRules() resourcev1alpha3.DeviceTaintRuleInterface { return newFakeDeviceTaintRuleClient(c.Fake, c.ClusterPath) } -func (c *ResourceV1alpha3Client) ResourceClaims(namespace string) resourcev1alpha3.ResourceClaimInterface { - return newFakeResourceClaimClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *ResourceV1alpha3Client) ResourceClaimTemplates(namespace string) resourcev1alpha3.ResourceClaimTemplateInterface { - return newFakeResourceClaimTemplateClient(c.Fake, namespace, c.ClusterPath) -} - -func (c *ResourceV1alpha3Client) ResourceSlices() resourcev1alpha3.ResourceSliceInterface { - return newFakeResourceSliceClient(c.Fake, c.ClusterPath) -} - // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *ResourceV1alpha3Client) RESTClient() rest.Interface { diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceclaim.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceclaim.go deleted file mode 100644 index 5f6895e1ebe..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceclaim.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" - - typedkcpresourcev1alpha3 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3" - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" -) - -// resourceClaimClusterClient implements ResourceClaimClusterInterface -type resourceClaimClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList] - Fake *kcptesting.Fake -} - -func newFakeResourceClaimClusterClient(fake *ResourceV1alpha3ClusterClient) typedkcpresourcev1alpha3.ResourceClaimClusterInterface { - return &resourceClaimClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList]( - fake.Fake, - resourcev1alpha3.SchemeGroupVersion.WithResource("resourceclaims"), - resourcev1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"), - func() *resourcev1alpha3.ResourceClaim { return &resourcev1alpha3.ResourceClaim{} }, - func() *resourcev1alpha3.ResourceClaimList { return &resourcev1alpha3.ResourceClaimList{} }, - func(dst, src *resourcev1alpha3.ResourceClaimList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.ResourceClaimList) []*resourcev1alpha3.ResourceClaim { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.ResourceClaimList, items []*resourcev1alpha3.ResourceClaim) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *resourceClaimClusterClient) Cluster(cluster logicalcluster.Path) typedkcpresourcev1alpha3.ResourceClaimsNamespacer { - return &resourceClaimNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type resourceClaimNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *resourceClaimNamespacer) Namespace(namespace string) typedresourcev1alpha3.ResourceClaimInterface { - return newFakeResourceClaimClient(n.Fake, namespace, n.ClusterPath) -} - -// resourceClaimScopedClient implements ResourceClaimInterface -type resourceClaimScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList, *v1alpha3.ResourceClaimApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeResourceClaimClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedresourcev1alpha3.ResourceClaimInterface { - return &resourceClaimScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*resourcev1alpha3.ResourceClaim, *resourcev1alpha3.ResourceClaimList, *v1alpha3.ResourceClaimApplyConfiguration]( - fake, - clusterPath, - namespace, - resourcev1alpha3.SchemeGroupVersion.WithResource("resourceclaims"), - resourcev1alpha3.SchemeGroupVersion.WithKind("ResourceClaim"), - func() *resourcev1alpha3.ResourceClaim { return &resourcev1alpha3.ResourceClaim{} }, - func() *resourcev1alpha3.ResourceClaimList { return &resourcev1alpha3.ResourceClaimList{} }, - func(dst, src *resourcev1alpha3.ResourceClaimList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.ResourceClaimList) []*resourcev1alpha3.ResourceClaim { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.ResourceClaimList, items []*resourcev1alpha3.ResourceClaim) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceclaimtemplate.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceclaimtemplate.go deleted file mode 100644 index ecfc3673293..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceclaimtemplate.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" - - typedkcpresourcev1alpha3 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3" - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" -) - -// resourceClaimTemplateClusterClient implements ResourceClaimTemplateClusterInterface -type resourceClaimTemplateClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList] - Fake *kcptesting.Fake -} - -func newFakeResourceClaimTemplateClusterClient(fake *ResourceV1alpha3ClusterClient) typedkcpresourcev1alpha3.ResourceClaimTemplateClusterInterface { - return &resourceClaimTemplateClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList]( - fake.Fake, - resourcev1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"), - resourcev1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplate"), - func() *resourcev1alpha3.ResourceClaimTemplate { return &resourcev1alpha3.ResourceClaimTemplate{} }, - func() *resourcev1alpha3.ResourceClaimTemplateList { - return &resourcev1alpha3.ResourceClaimTemplateList{} - }, - func(dst, src *resourcev1alpha3.ResourceClaimTemplateList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.ResourceClaimTemplateList) []*resourcev1alpha3.ResourceClaimTemplate { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.ResourceClaimTemplateList, items []*resourcev1alpha3.ResourceClaimTemplate) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *resourceClaimTemplateClusterClient) Cluster(cluster logicalcluster.Path) typedkcpresourcev1alpha3.ResourceClaimTemplatesNamespacer { - return &resourceClaimTemplateNamespacer{Fake: c.Fake, ClusterPath: cluster} -} - -type resourceClaimTemplateNamespacer struct { - *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func (n *resourceClaimTemplateNamespacer) Namespace(namespace string) typedresourcev1alpha3.ResourceClaimTemplateInterface { - return newFakeResourceClaimTemplateClient(n.Fake, namespace, n.ClusterPath) -} - -// resourceClaimTemplateScopedClient implements ResourceClaimTemplateInterface -type resourceClaimTemplateScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList, *v1alpha3.ResourceClaimTemplateApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeResourceClaimTemplateClient(fake *kcptesting.Fake, namespace string, clusterPath logicalcluster.Path) typedresourcev1alpha3.ResourceClaimTemplateInterface { - return &resourceClaimTemplateScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*resourcev1alpha3.ResourceClaimTemplate, *resourcev1alpha3.ResourceClaimTemplateList, *v1alpha3.ResourceClaimTemplateApplyConfiguration]( - fake, - clusterPath, - namespace, - resourcev1alpha3.SchemeGroupVersion.WithResource("resourceclaimtemplates"), - resourcev1alpha3.SchemeGroupVersion.WithKind("ResourceClaimTemplate"), - func() *resourcev1alpha3.ResourceClaimTemplate { return &resourcev1alpha3.ResourceClaimTemplate{} }, - func() *resourcev1alpha3.ResourceClaimTemplateList { - return &resourcev1alpha3.ResourceClaimTemplateList{} - }, - func(dst, src *resourcev1alpha3.ResourceClaimTemplateList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.ResourceClaimTemplateList) []*resourcev1alpha3.ResourceClaimTemplate { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.ResourceClaimTemplateList, items []*resourcev1alpha3.ResourceClaimTemplate) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceslice.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceslice.go deleted file mode 100644 index b89fc3f4a79..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/fake/resourceslice.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-client-gen. DO NOT EDIT. - -package fake - -import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" - v1alpha3 "k8s.io/client-go/applyconfigurations/resource/v1alpha3" - typedresourcev1alpha3 "k8s.io/client-go/kubernetes/typed/resource/v1alpha3" - - typedkcpresourcev1alpha3 "github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3" - kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" - kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" - "github.com/kcp-dev/logicalcluster/v3" -) - -// resourceSliceClusterClient implements ResourceSliceClusterInterface -type resourceSliceClusterClient struct { - *kcpgentype.FakeClusterClientWithList[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList] - Fake *kcptesting.Fake -} - -func newFakeResourceSliceClusterClient(fake *ResourceV1alpha3ClusterClient) typedkcpresourcev1alpha3.ResourceSliceClusterInterface { - return &resourceSliceClusterClient{ - kcpgentype.NewFakeClusterClientWithList[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList]( - fake.Fake, - resourcev1alpha3.SchemeGroupVersion.WithResource("resourceslices"), - resourcev1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"), - func() *resourcev1alpha3.ResourceSlice { return &resourcev1alpha3.ResourceSlice{} }, - func() *resourcev1alpha3.ResourceSliceList { return &resourcev1alpha3.ResourceSliceList{} }, - func(dst, src *resourcev1alpha3.ResourceSliceList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.ResourceSliceList) []*resourcev1alpha3.ResourceSlice { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.ResourceSliceList, items []*resourcev1alpha3.ResourceSlice) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake.Fake, - } -} - -func (c *resourceSliceClusterClient) Cluster(cluster logicalcluster.Path) typedresourcev1alpha3.ResourceSliceInterface { - return newFakeResourceSliceClient(c.Fake, cluster) -} - -// resourceSliceScopedClient implements ResourceSliceInterface -type resourceSliceScopedClient struct { - *kcpgentype.FakeClientWithListAndApply[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList, *v1alpha3.ResourceSliceApplyConfiguration] - Fake *kcptesting.Fake - ClusterPath logicalcluster.Path -} - -func newFakeResourceSliceClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedresourcev1alpha3.ResourceSliceInterface { - return &resourceSliceScopedClient{ - kcpgentype.NewFakeClientWithListAndApply[*resourcev1alpha3.ResourceSlice, *resourcev1alpha3.ResourceSliceList, *v1alpha3.ResourceSliceApplyConfiguration]( - fake, - clusterPath, - "", - resourcev1alpha3.SchemeGroupVersion.WithResource("resourceslices"), - resourcev1alpha3.SchemeGroupVersion.WithKind("ResourceSlice"), - func() *resourcev1alpha3.ResourceSlice { return &resourcev1alpha3.ResourceSlice{} }, - func() *resourcev1alpha3.ResourceSliceList { return &resourcev1alpha3.ResourceSliceList{} }, - func(dst, src *resourcev1alpha3.ResourceSliceList) { dst.ListMeta = src.ListMeta }, - func(list *resourcev1alpha3.ResourceSliceList) []*resourcev1alpha3.ResourceSlice { - return kcpgentype.ToPointerSlice(list.Items) - }, - func(list *resourcev1alpha3.ResourceSliceList, items []*resourcev1alpha3.ResourceSlice) { - list.Items = kcpgentype.FromPointerSlice(items) - }, - ), - fake, - clusterPath, - } -} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go index 0d6d54a2f01..ae99d12fc27 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/generated_expansion.go @@ -18,12 +18,4 @@ limitations under the License. package v1alpha3 -type DeviceClassClusterExpansion interface{} - type DeviceTaintRuleClusterExpansion interface{} - -type ResourceClaimClusterExpansion interface{} - -type ResourceClaimTemplateClusterExpansion interface{} - -type ResourceSliceClusterExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go index 57af3a5ffff..b433cee1083 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/resource/v1alpha3/resource_client.go @@ -32,11 +32,7 @@ import ( type ResourceV1alpha3ClusterInterface interface { ResourceV1alpha3ClusterScoper - DeviceClassesClusterGetter DeviceTaintRulesClusterGetter - ResourceClaimsClusterGetter - ResourceClaimTemplatesClusterGetter - ResourceSlicesClusterGetter } type ResourceV1alpha3ClusterScoper interface { @@ -55,26 +51,10 @@ func (c *ResourceV1alpha3ClusterClient) Cluster(clusterPath logicalcluster.Path) return c.clientCache.ClusterOrDie(clusterPath) } -func (c *ResourceV1alpha3ClusterClient) DeviceClasses() DeviceClassClusterInterface { - return &deviceClassesClusterInterface{clientCache: c.clientCache} -} - func (c *ResourceV1alpha3ClusterClient) DeviceTaintRules() DeviceTaintRuleClusterInterface { return &deviceTaintRulesClusterInterface{clientCache: c.clientCache} } -func (c *ResourceV1alpha3ClusterClient) ResourceClaims() ResourceClaimClusterInterface { - return &resourceClaimsClusterInterface{clientCache: c.clientCache} -} - -func (c *ResourceV1alpha3ClusterClient) ResourceClaimTemplates() ResourceClaimTemplateClusterInterface { - return &resourceClaimTemplatesClusterInterface{clientCache: c.clientCache} -} - -func (c *ResourceV1alpha3ClusterClient) ResourceSlices() ResourceSliceClusterInterface { - return &resourceSlicesClusterInterface{clientCache: c.clientCache} -} - // NewForConfig creates a new ResourceV1alpha3ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/fake/storage_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/fake/storage_client.go index a73e3cb02fc..2028781bebd 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/fake/storage_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/fake/storage_client.go @@ -60,6 +60,10 @@ func (c *StorageV1ClusterClient) VolumeAttachments() kcpstoragev1.VolumeAttachme return newFakeVolumeAttachmentClusterClient(c) } +func (c *StorageV1ClusterClient) VolumeAttributesClasses() kcpstoragev1.VolumeAttributesClassClusterInterface { + return newFakeVolumeAttributesClassClusterClient(c) +} + type StorageV1Client struct { *kcptesting.Fake ClusterPath logicalcluster.Path @@ -85,6 +89,10 @@ func (c *StorageV1Client) VolumeAttachments() storagev1.VolumeAttachmentInterfac return newFakeVolumeAttachmentClient(c.Fake, c.ClusterPath) } +func (c *StorageV1Client) VolumeAttributesClasses() storagev1.VolumeAttributesClassInterface { + return newFakeVolumeAttributesClassClient(c.Fake, c.ClusterPath) +} + // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *StorageV1Client) RESTClient() rest.Interface { diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/fake/volumeattributesclass.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/fake/volumeattributesclass.go new file mode 100644 index 00000000000..d772e1292be --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/fake/volumeattributesclass.go @@ -0,0 +1,90 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package fake + +import ( + storagev1 "k8s.io/api/storage/v1" + v1 "k8s.io/client-go/applyconfigurations/storage/v1" + typedstoragev1 "k8s.io/client-go/kubernetes/typed/storage/v1" + + typedkcpstoragev1 "github.com/kcp-dev/client-go/kubernetes/typed/storage/v1" + kcpgentype "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/gentype" + kcptesting "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing" + "github.com/kcp-dev/logicalcluster/v3" +) + +// volumeAttributesClassClusterClient implements VolumeAttributesClassClusterInterface +type volumeAttributesClassClusterClient struct { + *kcpgentype.FakeClusterClientWithList[*storagev1.VolumeAttributesClass, *storagev1.VolumeAttributesClassList] + Fake *kcptesting.Fake +} + +func newFakeVolumeAttributesClassClusterClient(fake *StorageV1ClusterClient) typedkcpstoragev1.VolumeAttributesClassClusterInterface { + return &volumeAttributesClassClusterClient{ + kcpgentype.NewFakeClusterClientWithList[*storagev1.VolumeAttributesClass, *storagev1.VolumeAttributesClassList]( + fake.Fake, + storagev1.SchemeGroupVersion.WithResource("volumeattributesclasses"), + storagev1.SchemeGroupVersion.WithKind("VolumeAttributesClass"), + func() *storagev1.VolumeAttributesClass { return &storagev1.VolumeAttributesClass{} }, + func() *storagev1.VolumeAttributesClassList { return &storagev1.VolumeAttributesClassList{} }, + func(dst, src *storagev1.VolumeAttributesClassList) { dst.ListMeta = src.ListMeta }, + func(list *storagev1.VolumeAttributesClassList) []*storagev1.VolumeAttributesClass { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *storagev1.VolumeAttributesClassList, items []*storagev1.VolumeAttributesClass) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake.Fake, + } +} + +func (c *volumeAttributesClassClusterClient) Cluster(cluster logicalcluster.Path) typedstoragev1.VolumeAttributesClassInterface { + return newFakeVolumeAttributesClassClient(c.Fake, cluster) +} + +// volumeAttributesClassScopedClient implements VolumeAttributesClassInterface +type volumeAttributesClassScopedClient struct { + *kcpgentype.FakeClientWithListAndApply[*storagev1.VolumeAttributesClass, *storagev1.VolumeAttributesClassList, *v1.VolumeAttributesClassApplyConfiguration] + Fake *kcptesting.Fake + ClusterPath logicalcluster.Path +} + +func newFakeVolumeAttributesClassClient(fake *kcptesting.Fake, clusterPath logicalcluster.Path) typedstoragev1.VolumeAttributesClassInterface { + return &volumeAttributesClassScopedClient{ + kcpgentype.NewFakeClientWithListAndApply[*storagev1.VolumeAttributesClass, *storagev1.VolumeAttributesClassList, *v1.VolumeAttributesClassApplyConfiguration]( + fake, + clusterPath, + "", + storagev1.SchemeGroupVersion.WithResource("volumeattributesclasses"), + storagev1.SchemeGroupVersion.WithKind("VolumeAttributesClass"), + func() *storagev1.VolumeAttributesClass { return &storagev1.VolumeAttributesClass{} }, + func() *storagev1.VolumeAttributesClassList { return &storagev1.VolumeAttributesClassList{} }, + func(dst, src *storagev1.VolumeAttributesClassList) { dst.ListMeta = src.ListMeta }, + func(list *storagev1.VolumeAttributesClassList) []*storagev1.VolumeAttributesClass { + return kcpgentype.ToPointerSlice(list.Items) + }, + func(list *storagev1.VolumeAttributesClassList, items []*storagev1.VolumeAttributesClass) { + list.Items = kcpgentype.FromPointerSlice(items) + }, + ), + fake, + clusterPath, + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/generated_expansion.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/generated_expansion.go index f1e6323da38..81a97eea087 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/generated_expansion.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/generated_expansion.go @@ -27,3 +27,5 @@ type CSIStorageCapacityClusterExpansion interface{} type StorageClassClusterExpansion interface{} type VolumeAttachmentClusterExpansion interface{} + +type VolumeAttributesClassClusterExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/storage_client.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/storage_client.go index 26d07a0e002..f5e97bc81a9 100644 --- a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/storage_client.go +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/storage_client.go @@ -37,6 +37,7 @@ type StorageV1ClusterInterface interface { CSIStorageCapacitiesClusterGetter StorageClassesClusterGetter VolumeAttachmentsClusterGetter + VolumeAttributesClassesClusterGetter } type StorageV1ClusterScoper interface { @@ -75,6 +76,10 @@ func (c *StorageV1ClusterClient) VolumeAttachments() VolumeAttachmentClusterInte return &volumeAttachmentsClusterInterface{clientCache: c.clientCache} } +func (c *StorageV1ClusterClient) VolumeAttributesClasses() VolumeAttributesClassClusterInterface { + return &volumeAttributesClassesClusterInterface{clientCache: c.clientCache} +} + // NewForConfig creates a new StorageV1ClusterClient for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). diff --git a/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/volumeattributesclass.go b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/volumeattributesclass.go new file mode 100644 index 00000000000..98aa8fd4ecf --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/kubernetes/typed/storage/v1/volumeattributesclass.go @@ -0,0 +1,69 @@ +/* +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. +*/ + +// Code generated by cluster-client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + apistoragev1 "k8s.io/api/storage/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + watch "k8s.io/apimachinery/pkg/watch" + storagev1 "k8s.io/client-go/kubernetes/typed/storage/v1" + + kcpclient "github.com/kcp-dev/apimachinery/v2/pkg/client" + "github.com/kcp-dev/logicalcluster/v3" +) + +// VolumeAttributesClassesClusterGetter has a method to return a VolumeAttributesClassClusterInterface. +// A group's cluster client should implement this interface. +type VolumeAttributesClassesClusterGetter interface { + VolumeAttributesClasses() VolumeAttributesClassClusterInterface +} + +// VolumeAttributesClassClusterInterface can operate on VolumeAttributesClasses across all clusters, +// or scope down to one cluster and return a storagev1.VolumeAttributesClassInterface. +type VolumeAttributesClassClusterInterface interface { + Cluster(logicalcluster.Path) storagev1.VolumeAttributesClassInterface + List(ctx context.Context, opts metav1.ListOptions) (*apistoragev1.VolumeAttributesClassList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + VolumeAttributesClassClusterExpansion +} + +type volumeAttributesClassesClusterInterface struct { + clientCache kcpclient.Cache[*storagev1.StorageV1Client] +} + +// Cluster scopes the client down to a particular cluster. +func (c *volumeAttributesClassesClusterInterface) Cluster(clusterPath logicalcluster.Path) storagev1.VolumeAttributesClassInterface { + if clusterPath == logicalcluster.Wildcard { + panic("A specific cluster must be provided when scoping, not the wildcard.") + } + + return c.clientCache.ClusterOrDie(clusterPath).VolumeAttributesClasses() +} + +// List returns the entire collection of all VolumeAttributesClasses across all clusters. +func (c *volumeAttributesClassesClusterInterface) List(ctx context.Context, opts metav1.ListOptions) (*apistoragev1.VolumeAttributesClassList, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).VolumeAttributesClasses().List(ctx, opts) +} + +// Watch begins to watch all VolumeAttributesClasses across all clusters. +func (c *volumeAttributesClassesClusterInterface) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { + return c.clientCache.ClusterOrDie(logicalcluster.Wildcard).VolumeAttributesClasses().Watch(ctx, opts) +} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/expansion_generated.go b/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/expansion_generated.go index 23cac805bd5..e0409e6d9c7 100644 --- a/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/expansion_generated.go +++ b/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/expansion_generated.go @@ -17,3 +17,11 @@ limitations under the License. // Code generated by cluster-lister-gen. DO NOT EDIT. package v1beta1 + +// MutatingAdmissionPolicyClusterListerExpansion allows custom methods to be added to +// MutatingAdmissionPolicyClusterLister. +type MutatingAdmissionPolicyClusterListerExpansion interface{} + +// MutatingAdmissionPolicyBindingClusterListerExpansion allows custom methods to be added to +// MutatingAdmissionPolicyBindingClusterLister. +type MutatingAdmissionPolicyBindingClusterListerExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/mutatingadmissionpolicy.go b/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/mutatingadmissionpolicy.go new file mode 100644 index 00000000000..fd16810f1bb --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/mutatingadmissionpolicy.go @@ -0,0 +1,91 @@ +/* +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. +*/ + +// Code generated by cluster-lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + "k8s.io/apimachinery/pkg/labels" + listersadmissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" + "k8s.io/client-go/tools/cache" + + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" + "github.com/kcp-dev/logicalcluster/v3" +) + +// MutatingAdmissionPolicyClusterLister helps list MutatingAdmissionPolicies across all workspaces, +// or scope down to a MutatingAdmissionPolicyLister for one workspace. +// All objects returned here must be treated as read-only. +type MutatingAdmissionPolicyClusterLister interface { + // List lists all MutatingAdmissionPolicies in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*admissionregistrationv1beta1.MutatingAdmissionPolicy, err error) + // Cluster returns a lister that can list and get MutatingAdmissionPolicies in one workspace. + Cluster(clusterName logicalcluster.Name) listersadmissionregistrationv1beta1.MutatingAdmissionPolicyLister + MutatingAdmissionPolicyClusterListerExpansion +} + +// mutatingAdmissionPolicyClusterLister implements the MutatingAdmissionPolicyClusterLister interface. +type mutatingAdmissionPolicyClusterLister struct { + kcplisters.ResourceClusterIndexer[*admissionregistrationv1beta1.MutatingAdmissionPolicy] +} + +var _ MutatingAdmissionPolicyClusterLister = new(mutatingAdmissionPolicyClusterLister) + +// NewMutatingAdmissionPolicyClusterLister returns a new MutatingAdmissionPolicyClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewMutatingAdmissionPolicyClusterLister(indexer cache.Indexer) MutatingAdmissionPolicyClusterLister { + return &mutatingAdmissionPolicyClusterLister{ + kcplisters.NewCluster[*admissionregistrationv1beta1.MutatingAdmissionPolicy](indexer, admissionregistrationv1beta1.Resource("mutatingadmissionpolicy")), + } +} + +// Cluster scopes the lister to one workspace, allowing users to list and get MutatingAdmissionPolicies. +func (l *mutatingAdmissionPolicyClusterLister) Cluster(clusterName logicalcluster.Name) listersadmissionregistrationv1beta1.MutatingAdmissionPolicyLister { + return &mutatingAdmissionPolicyLister{ + l.ResourceClusterIndexer.WithCluster(clusterName), + } +} + +// mutatingAdmissionPolicyLister can list all MutatingAdmissionPolicies inside a workspace +// or scope down to a listersadmissionregistrationv1beta1.MutatingAdmissionPolicyNamespaceLister for one namespace. +type mutatingAdmissionPolicyLister struct { + kcplisters.ResourceIndexer[*admissionregistrationv1beta1.MutatingAdmissionPolicy] +} + +var _ listersadmissionregistrationv1beta1.MutatingAdmissionPolicyLister = new(mutatingAdmissionPolicyLister) + +// NewMutatingAdmissionPolicyLister returns a new MutatingAdmissionPolicyLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewMutatingAdmissionPolicyLister(indexer cache.Indexer) listersadmissionregistrationv1beta1.MutatingAdmissionPolicyLister { + return &mutatingAdmissionPolicyLister{ + kcplisters.New[*admissionregistrationv1beta1.MutatingAdmissionPolicy](indexer, admissionregistrationv1beta1.Resource("mutatingadmissionpolicy")), + } +} + +// mutatingAdmissionPolicyScopedLister can list all MutatingAdmissionPolicies inside a workspace +// or scope down to a listersadmissionregistrationv1beta1.MutatingAdmissionPolicyNamespaceLister. +type mutatingAdmissionPolicyScopedLister struct { + kcplisters.ResourceIndexer[*admissionregistrationv1beta1.MutatingAdmissionPolicy] +} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go b/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go new file mode 100644 index 00000000000..0833e32bdf2 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/listers/admissionregistration/v1beta1/mutatingadmissionpolicybinding.go @@ -0,0 +1,91 @@ +/* +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. +*/ + +// Code generated by cluster-lister-gen. DO NOT EDIT. + +package v1beta1 + +import ( + admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" + "k8s.io/apimachinery/pkg/labels" + listersadmissionregistrationv1beta1 "k8s.io/client-go/listers/admissionregistration/v1beta1" + "k8s.io/client-go/tools/cache" + + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" + "github.com/kcp-dev/logicalcluster/v3" +) + +// MutatingAdmissionPolicyBindingClusterLister helps list MutatingAdmissionPolicyBindings across all workspaces, +// or scope down to a MutatingAdmissionPolicyBindingLister for one workspace. +// All objects returned here must be treated as read-only. +type MutatingAdmissionPolicyBindingClusterLister interface { + // List lists all MutatingAdmissionPolicyBindings in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding, err error) + // Cluster returns a lister that can list and get MutatingAdmissionPolicyBindings in one workspace. + Cluster(clusterName logicalcluster.Name) listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingLister + MutatingAdmissionPolicyBindingClusterListerExpansion +} + +// mutatingAdmissionPolicyBindingClusterLister implements the MutatingAdmissionPolicyBindingClusterLister interface. +type mutatingAdmissionPolicyBindingClusterLister struct { + kcplisters.ResourceClusterIndexer[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding] +} + +var _ MutatingAdmissionPolicyBindingClusterLister = new(mutatingAdmissionPolicyBindingClusterLister) + +// NewMutatingAdmissionPolicyBindingClusterLister returns a new MutatingAdmissionPolicyBindingClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewMutatingAdmissionPolicyBindingClusterLister(indexer cache.Indexer) MutatingAdmissionPolicyBindingClusterLister { + return &mutatingAdmissionPolicyBindingClusterLister{ + kcplisters.NewCluster[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding](indexer, admissionregistrationv1beta1.Resource("mutatingadmissionpolicybinding")), + } +} + +// Cluster scopes the lister to one workspace, allowing users to list and get MutatingAdmissionPolicyBindings. +func (l *mutatingAdmissionPolicyBindingClusterLister) Cluster(clusterName logicalcluster.Name) listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingLister { + return &mutatingAdmissionPolicyBindingLister{ + l.ResourceClusterIndexer.WithCluster(clusterName), + } +} + +// mutatingAdmissionPolicyBindingLister can list all MutatingAdmissionPolicyBindings inside a workspace +// or scope down to a listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingNamespaceLister for one namespace. +type mutatingAdmissionPolicyBindingLister struct { + kcplisters.ResourceIndexer[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding] +} + +var _ listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingLister = new(mutatingAdmissionPolicyBindingLister) + +// NewMutatingAdmissionPolicyBindingLister returns a new MutatingAdmissionPolicyBindingLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewMutatingAdmissionPolicyBindingLister(indexer cache.Indexer) listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingLister { + return &mutatingAdmissionPolicyBindingLister{ + kcplisters.New[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding](indexer, admissionregistrationv1beta1.Resource("mutatingadmissionpolicybinding")), + } +} + +// mutatingAdmissionPolicyBindingScopedLister can list all MutatingAdmissionPolicyBindings inside a workspace +// or scope down to a listersadmissionregistrationv1beta1.MutatingAdmissionPolicyBindingNamespaceLister. +type mutatingAdmissionPolicyBindingScopedLister struct { + kcplisters.ResourceIndexer[*admissionregistrationv1beta1.MutatingAdmissionPolicyBinding] +} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/certificates/v1alpha1/expansion_generated.go b/staging/src/github.com/kcp-dev/client-go/listers/certificates/v1alpha1/expansion_generated.go index 3b8521c0075..ff0d6287b89 100644 --- a/staging/src/github.com/kcp-dev/client-go/listers/certificates/v1alpha1/expansion_generated.go +++ b/staging/src/github.com/kcp-dev/client-go/listers/certificates/v1alpha1/expansion_generated.go @@ -17,3 +17,7 @@ limitations under the License. // Code generated by cluster-lister-gen. DO NOT EDIT. package v1alpha1 + +// PodCertificateRequestClusterListerExpansion allows custom methods to be added to +// PodCertificateRequestClusterLister. +type PodCertificateRequestClusterListerExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/certificates/v1alpha1/podcertificaterequest.go b/staging/src/github.com/kcp-dev/client-go/listers/certificates/v1alpha1/podcertificaterequest.go new file mode 100644 index 00000000000..56ba4e603d6 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/listers/certificates/v1alpha1/podcertificaterequest.go @@ -0,0 +1,115 @@ +/* +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. +*/ + +// Code generated by cluster-lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + certificatesv1alpha1 "k8s.io/api/certificates/v1alpha1" + "k8s.io/apimachinery/pkg/labels" + listerscertificatesv1alpha1 "k8s.io/client-go/listers/certificates/v1alpha1" + "k8s.io/client-go/tools/cache" + + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" + "github.com/kcp-dev/logicalcluster/v3" +) + +// PodCertificateRequestClusterLister helps list PodCertificateRequests across all workspaces, +// or scope down to a PodCertificateRequestLister for one workspace. +// All objects returned here must be treated as read-only. +type PodCertificateRequestClusterLister interface { + // List lists all PodCertificateRequests in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*certificatesv1alpha1.PodCertificateRequest, err error) + // Cluster returns a lister that can list and get PodCertificateRequests in one workspace. + Cluster(clusterName logicalcluster.Name) listerscertificatesv1alpha1.PodCertificateRequestLister + PodCertificateRequestClusterListerExpansion +} + +// podCertificateRequestClusterLister implements the PodCertificateRequestClusterLister interface. +type podCertificateRequestClusterLister struct { + kcplisters.ResourceClusterIndexer[*certificatesv1alpha1.PodCertificateRequest] +} + +var _ PodCertificateRequestClusterLister = new(podCertificateRequestClusterLister) + +// NewPodCertificateRequestClusterLister returns a new PodCertificateRequestClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +// - has the kcpcache.ClusterAndNamespaceIndex as an index +func NewPodCertificateRequestClusterLister(indexer cache.Indexer) PodCertificateRequestClusterLister { + return &podCertificateRequestClusterLister{ + kcplisters.NewCluster[*certificatesv1alpha1.PodCertificateRequest](indexer, certificatesv1alpha1.Resource("podcertificaterequest")), + } +} + +// Cluster scopes the lister to one workspace, allowing users to list and get PodCertificateRequests. +func (l *podCertificateRequestClusterLister) Cluster(clusterName logicalcluster.Name) listerscertificatesv1alpha1.PodCertificateRequestLister { + return &podCertificateRequestLister{ + l.ResourceClusterIndexer.WithCluster(clusterName), + } +} + +// podCertificateRequestLister can list all PodCertificateRequests inside a workspace +// or scope down to a listerscertificatesv1alpha1.PodCertificateRequestNamespaceLister for one namespace. +type podCertificateRequestLister struct { + kcplisters.ResourceIndexer[*certificatesv1alpha1.PodCertificateRequest] +} + +var _ listerscertificatesv1alpha1.PodCertificateRequestLister = new(podCertificateRequestLister) + +// PodCertificateRequests returns an object that can list and get PodCertificateRequests in one namespace. +func (l *podCertificateRequestLister) PodCertificateRequests(namespace string) listerscertificatesv1alpha1.PodCertificateRequestNamespaceLister { + return &podCertificateRequestNamespaceLister{ + l.ResourceIndexer.WithNamespace(namespace), + } +} + +// podCertificateRequestNamespaceLister implements the listerscertificatesv1alpha1.PodCertificateRequestNamespaceLister +// interface. +type podCertificateRequestNamespaceLister struct { + kcplisters.ResourceIndexer[*certificatesv1alpha1.PodCertificateRequest] +} + +var _ listerscertificatesv1alpha1.PodCertificateRequestNamespaceLister = new(podCertificateRequestNamespaceLister) + +// NewPodCertificateRequestLister returns a new PodCertificateRequestLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +// - has the kcpcache.ClusterAndNamespaceIndex as an index +func NewPodCertificateRequestLister(indexer cache.Indexer) listerscertificatesv1alpha1.PodCertificateRequestLister { + return &podCertificateRequestLister{ + kcplisters.New[*certificatesv1alpha1.PodCertificateRequest](indexer, certificatesv1alpha1.Resource("podcertificaterequest")), + } +} + +// podCertificateRequestScopedLister can list all PodCertificateRequests inside a workspace +// or scope down to a listerscertificatesv1alpha1.PodCertificateRequestNamespaceLister for one namespace. +type podCertificateRequestScopedLister struct { + kcplisters.ResourceIndexer[*certificatesv1alpha1.PodCertificateRequest] +} + +// PodCertificateRequests returns an object that can list and get PodCertificateRequests in one namespace. +func (l *podCertificateRequestScopedLister) PodCertificateRequests(namespace string) listerscertificatesv1alpha1.PodCertificateRequestLister { + return &podCertificateRequestLister{ + l.ResourceIndexer.WithNamespace(namespace), + } +} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/expansion_generated.go b/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/expansion_generated.go deleted file mode 100644 index 3b8521c0075..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 diff --git a/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/ipaddress.go b/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/ipaddress.go deleted file mode 100644 index 357e93551d9..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/ipaddress.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - listersnetworkingv1alpha1 "k8s.io/client-go/listers/networking/v1alpha1" - "k8s.io/client-go/tools/cache" - - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" -) - -// IPAddressClusterLister helps list IPAddresses across all workspaces, -// or scope down to a IPAddressLister for one workspace. -// All objects returned here must be treated as read-only. -type IPAddressClusterLister interface { - // List lists all IPAddresses in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*networkingv1alpha1.IPAddress, err error) - // Cluster returns a lister that can list and get IPAddresses in one workspace. - Cluster(clusterName logicalcluster.Name) listersnetworkingv1alpha1.IPAddressLister - IPAddressClusterListerExpansion -} - -// iPAddressClusterLister implements the IPAddressClusterLister interface. -type iPAddressClusterLister struct { - kcplisters.ResourceClusterIndexer[*networkingv1alpha1.IPAddress] -} - -var _ IPAddressClusterLister = new(iPAddressClusterLister) - -// NewIPAddressClusterLister returns a new IPAddressClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewIPAddressClusterLister(indexer cache.Indexer) IPAddressClusterLister { - return &iPAddressClusterLister{ - kcplisters.NewCluster[*networkingv1alpha1.IPAddress](indexer, networkingv1alpha1.Resource("ipaddress")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get IPAddresses. -func (l *iPAddressClusterLister) Cluster(clusterName logicalcluster.Name) listersnetworkingv1alpha1.IPAddressLister { - return &iPAddressLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// iPAddressLister can list all IPAddresses inside a workspace -// or scope down to a listersnetworkingv1alpha1.IPAddressNamespaceLister for one namespace. -type iPAddressLister struct { - kcplisters.ResourceIndexer[*networkingv1alpha1.IPAddress] -} - -var _ listersnetworkingv1alpha1.IPAddressLister = new(iPAddressLister) - -// NewIPAddressLister returns a new IPAddressLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewIPAddressLister(indexer cache.Indexer) listersnetworkingv1alpha1.IPAddressLister { - return &iPAddressLister{ - kcplisters.New[*networkingv1alpha1.IPAddress](indexer, networkingv1alpha1.Resource("ipaddress")), - } -} - -// iPAddressScopedLister can list all IPAddresses inside a workspace -// or scope down to a listersnetworkingv1alpha1.IPAddressNamespaceLister. -type iPAddressScopedLister struct { - kcplisters.ResourceIndexer[*networkingv1alpha1.IPAddress] -} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/servicecidr.go b/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/servicecidr.go deleted file mode 100644 index 5b11158553f..00000000000 --- a/staging/src/github.com/kcp-dev/client-go/listers/networking/v1alpha1/servicecidr.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -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. -*/ - -// Code generated by cluster-lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - networkingv1alpha1 "k8s.io/api/networking/v1alpha1" - "k8s.io/apimachinery/pkg/labels" - listersnetworkingv1alpha1 "k8s.io/client-go/listers/networking/v1alpha1" - "k8s.io/client-go/tools/cache" - - kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" - "github.com/kcp-dev/logicalcluster/v3" -) - -// ServiceCIDRClusterLister helps list ServiceCIDRs across all workspaces, -// or scope down to a ServiceCIDRLister for one workspace. -// All objects returned here must be treated as read-only. -type ServiceCIDRClusterLister interface { - // List lists all ServiceCIDRs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*networkingv1alpha1.ServiceCIDR, err error) - // Cluster returns a lister that can list and get ServiceCIDRs in one workspace. - Cluster(clusterName logicalcluster.Name) listersnetworkingv1alpha1.ServiceCIDRLister - ServiceCIDRClusterListerExpansion -} - -// serviceCIDRClusterLister implements the ServiceCIDRClusterLister interface. -type serviceCIDRClusterLister struct { - kcplisters.ResourceClusterIndexer[*networkingv1alpha1.ServiceCIDR] -} - -var _ ServiceCIDRClusterLister = new(serviceCIDRClusterLister) - -// NewServiceCIDRClusterLister returns a new ServiceCIDRClusterLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewServiceCIDRClusterLister(indexer cache.Indexer) ServiceCIDRClusterLister { - return &serviceCIDRClusterLister{ - kcplisters.NewCluster[*networkingv1alpha1.ServiceCIDR](indexer, networkingv1alpha1.Resource("servicecidr")), - } -} - -// Cluster scopes the lister to one workspace, allowing users to list and get ServiceCIDRs. -func (l *serviceCIDRClusterLister) Cluster(clusterName logicalcluster.Name) listersnetworkingv1alpha1.ServiceCIDRLister { - return &serviceCIDRLister{ - l.ResourceClusterIndexer.WithCluster(clusterName), - } -} - -// serviceCIDRLister can list all ServiceCIDRs inside a workspace -// or scope down to a listersnetworkingv1alpha1.ServiceCIDRNamespaceLister for one namespace. -type serviceCIDRLister struct { - kcplisters.ResourceIndexer[*networkingv1alpha1.ServiceCIDR] -} - -var _ listersnetworkingv1alpha1.ServiceCIDRLister = new(serviceCIDRLister) - -// NewServiceCIDRLister returns a new ServiceCIDRLister. -// We assume that the indexer: -// - is fed by a cross-workspace LIST+WATCH -// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function -// - has the kcpcache.ClusterIndex as an index -func NewServiceCIDRLister(indexer cache.Indexer) listersnetworkingv1alpha1.ServiceCIDRLister { - return &serviceCIDRLister{ - kcplisters.New[*networkingv1alpha1.ServiceCIDR](indexer, networkingv1alpha1.Resource("servicecidr")), - } -} - -// serviceCIDRScopedLister can list all ServiceCIDRs inside a workspace -// or scope down to a listersnetworkingv1alpha1.ServiceCIDRNamespaceLister. -type serviceCIDRScopedLister struct { - kcplisters.ResourceIndexer[*networkingv1alpha1.ServiceCIDR] -} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/deviceclass.go b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/deviceclass.go similarity index 72% rename from staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/deviceclass.go rename to staging/src/github.com/kcp-dev/client-go/listers/resource/v1/deviceclass.go index 363077821ba..e27cfe40be9 100644 --- a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/deviceclass.go +++ b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/deviceclass.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by cluster-lister-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" + resourcev1 "k8s.io/api/resource/v1" "k8s.io/apimachinery/pkg/labels" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" "k8s.io/client-go/tools/cache" kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" @@ -34,15 +34,15 @@ import ( type DeviceClassClusterLister interface { // List lists all DeviceClasses in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*resourcev1alpha3.DeviceClass, err error) + List(selector labels.Selector) (ret []*resourcev1.DeviceClass, err error) // Cluster returns a lister that can list and get DeviceClasses in one workspace. - Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.DeviceClassLister + Cluster(clusterName logicalcluster.Name) listersresourcev1.DeviceClassLister DeviceClassClusterListerExpansion } // deviceClassClusterLister implements the DeviceClassClusterLister interface. type deviceClassClusterLister struct { - kcplisters.ResourceClusterIndexer[*resourcev1alpha3.DeviceClass] + kcplisters.ResourceClusterIndexer[*resourcev1.DeviceClass] } var _ DeviceClassClusterLister = new(deviceClassClusterLister) @@ -54,38 +54,38 @@ var _ DeviceClassClusterLister = new(deviceClassClusterLister) // - has the kcpcache.ClusterIndex as an index func NewDeviceClassClusterLister(indexer cache.Indexer) DeviceClassClusterLister { return &deviceClassClusterLister{ - kcplisters.NewCluster[*resourcev1alpha3.DeviceClass](indexer, resourcev1alpha3.Resource("deviceclass")), + kcplisters.NewCluster[*resourcev1.DeviceClass](indexer, resourcev1.Resource("deviceclass")), } } // Cluster scopes the lister to one workspace, allowing users to list and get DeviceClasses. -func (l *deviceClassClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.DeviceClassLister { +func (l *deviceClassClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1.DeviceClassLister { return &deviceClassLister{ l.ResourceClusterIndexer.WithCluster(clusterName), } } // deviceClassLister can list all DeviceClasses inside a workspace -// or scope down to a listersresourcev1alpha3.DeviceClassNamespaceLister for one namespace. +// or scope down to a listersresourcev1.DeviceClassNamespaceLister for one namespace. type deviceClassLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.DeviceClass] + kcplisters.ResourceIndexer[*resourcev1.DeviceClass] } -var _ listersresourcev1alpha3.DeviceClassLister = new(deviceClassLister) +var _ listersresourcev1.DeviceClassLister = new(deviceClassLister) // NewDeviceClassLister returns a new DeviceClassLister. // We assume that the indexer: // - is fed by a cross-workspace LIST+WATCH // - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function // - has the kcpcache.ClusterIndex as an index -func NewDeviceClassLister(indexer cache.Indexer) listersresourcev1alpha3.DeviceClassLister { +func NewDeviceClassLister(indexer cache.Indexer) listersresourcev1.DeviceClassLister { return &deviceClassLister{ - kcplisters.New[*resourcev1alpha3.DeviceClass](indexer, resourcev1alpha3.Resource("deviceclass")), + kcplisters.New[*resourcev1.DeviceClass](indexer, resourcev1.Resource("deviceclass")), } } // deviceClassScopedLister can list all DeviceClasses inside a workspace -// or scope down to a listersresourcev1alpha3.DeviceClassNamespaceLister. +// or scope down to a listersresourcev1.DeviceClassNamespaceLister. type deviceClassScopedLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.DeviceClass] + kcplisters.ResourceIndexer[*resourcev1.DeviceClass] } diff --git a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/expansion_generated.go b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/expansion_generated.go new file mode 100644 index 00000000000..a69a8be8e7e --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/expansion_generated.go @@ -0,0 +1,35 @@ +/* +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. +*/ + +// Code generated by cluster-lister-gen. DO NOT EDIT. + +package v1 + +// DeviceClassClusterListerExpansion allows custom methods to be added to +// DeviceClassClusterLister. +type DeviceClassClusterListerExpansion interface{} + +// ResourceClaimClusterListerExpansion allows custom methods to be added to +// ResourceClaimClusterLister. +type ResourceClaimClusterListerExpansion interface{} + +// ResourceClaimTemplateClusterListerExpansion allows custom methods to be added to +// ResourceClaimTemplateClusterLister. +type ResourceClaimTemplateClusterListerExpansion interface{} + +// ResourceSliceClusterListerExpansion allows custom methods to be added to +// ResourceSliceClusterLister. +type ResourceSliceClusterListerExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceclaim.go b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceclaim.go similarity index 71% rename from staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceclaim.go rename to staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceclaim.go index b360d51531c..13a259be5f0 100644 --- a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceclaim.go +++ b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceclaim.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by cluster-lister-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" + resourcev1 "k8s.io/api/resource/v1" "k8s.io/apimachinery/pkg/labels" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" "k8s.io/client-go/tools/cache" kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" @@ -34,15 +34,15 @@ import ( type ResourceClaimClusterLister interface { // List lists all ResourceClaims in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceClaim, err error) + List(selector labels.Selector) (ret []*resourcev1.ResourceClaim, err error) // Cluster returns a lister that can list and get ResourceClaims in one workspace. - Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.ResourceClaimLister + Cluster(clusterName logicalcluster.Name) listersresourcev1.ResourceClaimLister ResourceClaimClusterListerExpansion } // resourceClaimClusterLister implements the ResourceClaimClusterLister interface. type resourceClaimClusterLister struct { - kcplisters.ResourceClusterIndexer[*resourcev1alpha3.ResourceClaim] + kcplisters.ResourceClusterIndexer[*resourcev1.ResourceClaim] } var _ ResourceClaimClusterLister = new(resourceClaimClusterLister) @@ -55,39 +55,39 @@ var _ ResourceClaimClusterLister = new(resourceClaimClusterLister) // - has the kcpcache.ClusterAndNamespaceIndex as an index func NewResourceClaimClusterLister(indexer cache.Indexer) ResourceClaimClusterLister { return &resourceClaimClusterLister{ - kcplisters.NewCluster[*resourcev1alpha3.ResourceClaim](indexer, resourcev1alpha3.Resource("resourceclaim")), + kcplisters.NewCluster[*resourcev1.ResourceClaim](indexer, resourcev1.Resource("resourceclaim")), } } // Cluster scopes the lister to one workspace, allowing users to list and get ResourceClaims. -func (l *resourceClaimClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.ResourceClaimLister { +func (l *resourceClaimClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1.ResourceClaimLister { return &resourceClaimLister{ l.ResourceClusterIndexer.WithCluster(clusterName), } } // resourceClaimLister can list all ResourceClaims inside a workspace -// or scope down to a listersresourcev1alpha3.ResourceClaimNamespaceLister for one namespace. +// or scope down to a listersresourcev1.ResourceClaimNamespaceLister for one namespace. type resourceClaimLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceClaim] + kcplisters.ResourceIndexer[*resourcev1.ResourceClaim] } -var _ listersresourcev1alpha3.ResourceClaimLister = new(resourceClaimLister) +var _ listersresourcev1.ResourceClaimLister = new(resourceClaimLister) // ResourceClaims returns an object that can list and get ResourceClaims in one namespace. -func (l *resourceClaimLister) ResourceClaims(namespace string) listersresourcev1alpha3.ResourceClaimNamespaceLister { +func (l *resourceClaimLister) ResourceClaims(namespace string) listersresourcev1.ResourceClaimNamespaceLister { return &resourceClaimNamespaceLister{ l.ResourceIndexer.WithNamespace(namespace), } } -// resourceClaimNamespaceLister implements the listersresourcev1alpha3.ResourceClaimNamespaceLister +// resourceClaimNamespaceLister implements the listersresourcev1.ResourceClaimNamespaceLister // interface. type resourceClaimNamespaceLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceClaim] + kcplisters.ResourceIndexer[*resourcev1.ResourceClaim] } -var _ listersresourcev1alpha3.ResourceClaimNamespaceLister = new(resourceClaimNamespaceLister) +var _ listersresourcev1.ResourceClaimNamespaceLister = new(resourceClaimNamespaceLister) // NewResourceClaimLister returns a new ResourceClaimLister. // We assume that the indexer: @@ -95,20 +95,20 @@ var _ listersresourcev1alpha3.ResourceClaimNamespaceLister = new(resourceClaimNa // - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function // - has the kcpcache.ClusterIndex as an index // - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewResourceClaimLister(indexer cache.Indexer) listersresourcev1alpha3.ResourceClaimLister { +func NewResourceClaimLister(indexer cache.Indexer) listersresourcev1.ResourceClaimLister { return &resourceClaimLister{ - kcplisters.New[*resourcev1alpha3.ResourceClaim](indexer, resourcev1alpha3.Resource("resourceclaim")), + kcplisters.New[*resourcev1.ResourceClaim](indexer, resourcev1.Resource("resourceclaim")), } } // resourceClaimScopedLister can list all ResourceClaims inside a workspace -// or scope down to a listersresourcev1alpha3.ResourceClaimNamespaceLister for one namespace. +// or scope down to a listersresourcev1.ResourceClaimNamespaceLister for one namespace. type resourceClaimScopedLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceClaim] + kcplisters.ResourceIndexer[*resourcev1.ResourceClaim] } // ResourceClaims returns an object that can list and get ResourceClaims in one namespace. -func (l *resourceClaimScopedLister) ResourceClaims(namespace string) listersresourcev1alpha3.ResourceClaimLister { +func (l *resourceClaimScopedLister) ResourceClaims(namespace string) listersresourcev1.ResourceClaimLister { return &resourceClaimLister{ l.ResourceIndexer.WithNamespace(namespace), } diff --git a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceclaimtemplate.go b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceclaimtemplate.go similarity index 70% rename from staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceclaimtemplate.go rename to staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceclaimtemplate.go index bf36e00392d..f0585b9675b 100644 --- a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceclaimtemplate.go +++ b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceclaimtemplate.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by cluster-lister-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" + resourcev1 "k8s.io/api/resource/v1" "k8s.io/apimachinery/pkg/labels" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" "k8s.io/client-go/tools/cache" kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" @@ -34,15 +34,15 @@ import ( type ResourceClaimTemplateClusterLister interface { // List lists all ResourceClaimTemplates in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceClaimTemplate, err error) + List(selector labels.Selector) (ret []*resourcev1.ResourceClaimTemplate, err error) // Cluster returns a lister that can list and get ResourceClaimTemplates in one workspace. - Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.ResourceClaimTemplateLister + Cluster(clusterName logicalcluster.Name) listersresourcev1.ResourceClaimTemplateLister ResourceClaimTemplateClusterListerExpansion } // resourceClaimTemplateClusterLister implements the ResourceClaimTemplateClusterLister interface. type resourceClaimTemplateClusterLister struct { - kcplisters.ResourceClusterIndexer[*resourcev1alpha3.ResourceClaimTemplate] + kcplisters.ResourceClusterIndexer[*resourcev1.ResourceClaimTemplate] } var _ ResourceClaimTemplateClusterLister = new(resourceClaimTemplateClusterLister) @@ -55,39 +55,39 @@ var _ ResourceClaimTemplateClusterLister = new(resourceClaimTemplateClusterListe // - has the kcpcache.ClusterAndNamespaceIndex as an index func NewResourceClaimTemplateClusterLister(indexer cache.Indexer) ResourceClaimTemplateClusterLister { return &resourceClaimTemplateClusterLister{ - kcplisters.NewCluster[*resourcev1alpha3.ResourceClaimTemplate](indexer, resourcev1alpha3.Resource("resourceclaimtemplate")), + kcplisters.NewCluster[*resourcev1.ResourceClaimTemplate](indexer, resourcev1.Resource("resourceclaimtemplate")), } } // Cluster scopes the lister to one workspace, allowing users to list and get ResourceClaimTemplates. -func (l *resourceClaimTemplateClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.ResourceClaimTemplateLister { +func (l *resourceClaimTemplateClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1.ResourceClaimTemplateLister { return &resourceClaimTemplateLister{ l.ResourceClusterIndexer.WithCluster(clusterName), } } // resourceClaimTemplateLister can list all ResourceClaimTemplates inside a workspace -// or scope down to a listersresourcev1alpha3.ResourceClaimTemplateNamespaceLister for one namespace. +// or scope down to a listersresourcev1.ResourceClaimTemplateNamespaceLister for one namespace. type resourceClaimTemplateLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceClaimTemplate] + kcplisters.ResourceIndexer[*resourcev1.ResourceClaimTemplate] } -var _ listersresourcev1alpha3.ResourceClaimTemplateLister = new(resourceClaimTemplateLister) +var _ listersresourcev1.ResourceClaimTemplateLister = new(resourceClaimTemplateLister) // ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates in one namespace. -func (l *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) listersresourcev1alpha3.ResourceClaimTemplateNamespaceLister { +func (l *resourceClaimTemplateLister) ResourceClaimTemplates(namespace string) listersresourcev1.ResourceClaimTemplateNamespaceLister { return &resourceClaimTemplateNamespaceLister{ l.ResourceIndexer.WithNamespace(namespace), } } -// resourceClaimTemplateNamespaceLister implements the listersresourcev1alpha3.ResourceClaimTemplateNamespaceLister +// resourceClaimTemplateNamespaceLister implements the listersresourcev1.ResourceClaimTemplateNamespaceLister // interface. type resourceClaimTemplateNamespaceLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceClaimTemplate] + kcplisters.ResourceIndexer[*resourcev1.ResourceClaimTemplate] } -var _ listersresourcev1alpha3.ResourceClaimTemplateNamespaceLister = new(resourceClaimTemplateNamespaceLister) +var _ listersresourcev1.ResourceClaimTemplateNamespaceLister = new(resourceClaimTemplateNamespaceLister) // NewResourceClaimTemplateLister returns a new ResourceClaimTemplateLister. // We assume that the indexer: @@ -95,20 +95,20 @@ var _ listersresourcev1alpha3.ResourceClaimTemplateNamespaceLister = new(resourc // - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function // - has the kcpcache.ClusterIndex as an index // - has the kcpcache.ClusterAndNamespaceIndex as an index -func NewResourceClaimTemplateLister(indexer cache.Indexer) listersresourcev1alpha3.ResourceClaimTemplateLister { +func NewResourceClaimTemplateLister(indexer cache.Indexer) listersresourcev1.ResourceClaimTemplateLister { return &resourceClaimTemplateLister{ - kcplisters.New[*resourcev1alpha3.ResourceClaimTemplate](indexer, resourcev1alpha3.Resource("resourceclaimtemplate")), + kcplisters.New[*resourcev1.ResourceClaimTemplate](indexer, resourcev1.Resource("resourceclaimtemplate")), } } // resourceClaimTemplateScopedLister can list all ResourceClaimTemplates inside a workspace -// or scope down to a listersresourcev1alpha3.ResourceClaimTemplateNamespaceLister for one namespace. +// or scope down to a listersresourcev1.ResourceClaimTemplateNamespaceLister for one namespace. type resourceClaimTemplateScopedLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceClaimTemplate] + kcplisters.ResourceIndexer[*resourcev1.ResourceClaimTemplate] } // ResourceClaimTemplates returns an object that can list and get ResourceClaimTemplates in one namespace. -func (l *resourceClaimTemplateScopedLister) ResourceClaimTemplates(namespace string) listersresourcev1alpha3.ResourceClaimTemplateLister { +func (l *resourceClaimTemplateScopedLister) ResourceClaimTemplates(namespace string) listersresourcev1.ResourceClaimTemplateLister { return &resourceClaimTemplateLister{ l.ResourceIndexer.WithNamespace(namespace), } diff --git a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceslice.go b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceslice.go similarity index 72% rename from staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceslice.go rename to staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceslice.go index 49af13bdeff..67816a20fd6 100644 --- a/staging/src/github.com/kcp-dev/client-go/listers/resource/v1alpha3/resourceslice.go +++ b/staging/src/github.com/kcp-dev/client-go/listers/resource/v1/resourceslice.go @@ -16,12 +16,12 @@ limitations under the License. // Code generated by cluster-lister-gen. DO NOT EDIT. -package v1alpha3 +package v1 import ( - resourcev1alpha3 "k8s.io/api/resource/v1alpha3" + resourcev1 "k8s.io/api/resource/v1" "k8s.io/apimachinery/pkg/labels" - listersresourcev1alpha3 "k8s.io/client-go/listers/resource/v1alpha3" + listersresourcev1 "k8s.io/client-go/listers/resource/v1" "k8s.io/client-go/tools/cache" kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" @@ -34,15 +34,15 @@ import ( type ResourceSliceClusterLister interface { // List lists all ResourceSlices in the indexer. // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*resourcev1alpha3.ResourceSlice, err error) + List(selector labels.Selector) (ret []*resourcev1.ResourceSlice, err error) // Cluster returns a lister that can list and get ResourceSlices in one workspace. - Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.ResourceSliceLister + Cluster(clusterName logicalcluster.Name) listersresourcev1.ResourceSliceLister ResourceSliceClusterListerExpansion } // resourceSliceClusterLister implements the ResourceSliceClusterLister interface. type resourceSliceClusterLister struct { - kcplisters.ResourceClusterIndexer[*resourcev1alpha3.ResourceSlice] + kcplisters.ResourceClusterIndexer[*resourcev1.ResourceSlice] } var _ ResourceSliceClusterLister = new(resourceSliceClusterLister) @@ -54,38 +54,38 @@ var _ ResourceSliceClusterLister = new(resourceSliceClusterLister) // - has the kcpcache.ClusterIndex as an index func NewResourceSliceClusterLister(indexer cache.Indexer) ResourceSliceClusterLister { return &resourceSliceClusterLister{ - kcplisters.NewCluster[*resourcev1alpha3.ResourceSlice](indexer, resourcev1alpha3.Resource("resourceslice")), + kcplisters.NewCluster[*resourcev1.ResourceSlice](indexer, resourcev1.Resource("resourceslice")), } } // Cluster scopes the lister to one workspace, allowing users to list and get ResourceSlices. -func (l *resourceSliceClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1alpha3.ResourceSliceLister { +func (l *resourceSliceClusterLister) Cluster(clusterName logicalcluster.Name) listersresourcev1.ResourceSliceLister { return &resourceSliceLister{ l.ResourceClusterIndexer.WithCluster(clusterName), } } // resourceSliceLister can list all ResourceSlices inside a workspace -// or scope down to a listersresourcev1alpha3.ResourceSliceNamespaceLister for one namespace. +// or scope down to a listersresourcev1.ResourceSliceNamespaceLister for one namespace. type resourceSliceLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceSlice] + kcplisters.ResourceIndexer[*resourcev1.ResourceSlice] } -var _ listersresourcev1alpha3.ResourceSliceLister = new(resourceSliceLister) +var _ listersresourcev1.ResourceSliceLister = new(resourceSliceLister) // NewResourceSliceLister returns a new ResourceSliceLister. // We assume that the indexer: // - is fed by a cross-workspace LIST+WATCH // - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function // - has the kcpcache.ClusterIndex as an index -func NewResourceSliceLister(indexer cache.Indexer) listersresourcev1alpha3.ResourceSliceLister { +func NewResourceSliceLister(indexer cache.Indexer) listersresourcev1.ResourceSliceLister { return &resourceSliceLister{ - kcplisters.New[*resourcev1alpha3.ResourceSlice](indexer, resourcev1alpha3.Resource("resourceslice")), + kcplisters.New[*resourcev1.ResourceSlice](indexer, resourcev1.Resource("resourceslice")), } } // resourceSliceScopedLister can list all ResourceSlices inside a workspace -// or scope down to a listersresourcev1alpha3.ResourceSliceNamespaceLister. +// or scope down to a listersresourcev1.ResourceSliceNamespaceLister. type resourceSliceScopedLister struct { - kcplisters.ResourceIndexer[*resourcev1alpha3.ResourceSlice] + kcplisters.ResourceIndexer[*resourcev1.ResourceSlice] } diff --git a/staging/src/github.com/kcp-dev/client-go/listers/storage/v1/expansion_generated.go b/staging/src/github.com/kcp-dev/client-go/listers/storage/v1/expansion_generated.go index b6a0c637736..a8c31d91334 100644 --- a/staging/src/github.com/kcp-dev/client-go/listers/storage/v1/expansion_generated.go +++ b/staging/src/github.com/kcp-dev/client-go/listers/storage/v1/expansion_generated.go @@ -17,3 +17,7 @@ limitations under the License. // Code generated by cluster-lister-gen. DO NOT EDIT. package v1 + +// VolumeAttributesClassClusterListerExpansion allows custom methods to be added to +// VolumeAttributesClassClusterLister. +type VolumeAttributesClassClusterListerExpansion interface{} diff --git a/staging/src/github.com/kcp-dev/client-go/listers/storage/v1/volumeattributesclass.go b/staging/src/github.com/kcp-dev/client-go/listers/storage/v1/volumeattributesclass.go new file mode 100644 index 00000000000..31d5cd58518 --- /dev/null +++ b/staging/src/github.com/kcp-dev/client-go/listers/storage/v1/volumeattributesclass.go @@ -0,0 +1,91 @@ +/* +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. +*/ + +// Code generated by cluster-lister-gen. DO NOT EDIT. + +package v1 + +import ( + storagev1 "k8s.io/api/storage/v1" + "k8s.io/apimachinery/pkg/labels" + listersstoragev1 "k8s.io/client-go/listers/storage/v1" + "k8s.io/client-go/tools/cache" + + kcplisters "github.com/kcp-dev/client-go/third_party/k8s.io/client-go/listers" + "github.com/kcp-dev/logicalcluster/v3" +) + +// VolumeAttributesClassClusterLister helps list VolumeAttributesClasses across all workspaces, +// or scope down to a VolumeAttributesClassLister for one workspace. +// All objects returned here must be treated as read-only. +type VolumeAttributesClassClusterLister interface { + // List lists all VolumeAttributesClasses in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*storagev1.VolumeAttributesClass, err error) + // Cluster returns a lister that can list and get VolumeAttributesClasses in one workspace. + Cluster(clusterName logicalcluster.Name) listersstoragev1.VolumeAttributesClassLister + VolumeAttributesClassClusterListerExpansion +} + +// volumeAttributesClassClusterLister implements the VolumeAttributesClassClusterLister interface. +type volumeAttributesClassClusterLister struct { + kcplisters.ResourceClusterIndexer[*storagev1.VolumeAttributesClass] +} + +var _ VolumeAttributesClassClusterLister = new(volumeAttributesClassClusterLister) + +// NewVolumeAttributesClassClusterLister returns a new VolumeAttributesClassClusterLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewVolumeAttributesClassClusterLister(indexer cache.Indexer) VolumeAttributesClassClusterLister { + return &volumeAttributesClassClusterLister{ + kcplisters.NewCluster[*storagev1.VolumeAttributesClass](indexer, storagev1.Resource("volumeattributesclass")), + } +} + +// Cluster scopes the lister to one workspace, allowing users to list and get VolumeAttributesClasses. +func (l *volumeAttributesClassClusterLister) Cluster(clusterName logicalcluster.Name) listersstoragev1.VolumeAttributesClassLister { + return &volumeAttributesClassLister{ + l.ResourceClusterIndexer.WithCluster(clusterName), + } +} + +// volumeAttributesClassLister can list all VolumeAttributesClasses inside a workspace +// or scope down to a listersstoragev1.VolumeAttributesClassNamespaceLister for one namespace. +type volumeAttributesClassLister struct { + kcplisters.ResourceIndexer[*storagev1.VolumeAttributesClass] +} + +var _ listersstoragev1.VolumeAttributesClassLister = new(volumeAttributesClassLister) + +// NewVolumeAttributesClassLister returns a new VolumeAttributesClassLister. +// We assume that the indexer: +// - is fed by a cross-workspace LIST+WATCH +// - uses kcpcache.MetaClusterNamespaceKeyFunc as the key function +// - has the kcpcache.ClusterIndex as an index +func NewVolumeAttributesClassLister(indexer cache.Indexer) listersstoragev1.VolumeAttributesClassLister { + return &volumeAttributesClassLister{ + kcplisters.New[*storagev1.VolumeAttributesClass](indexer, storagev1.Resource("volumeattributesclass")), + } +} + +// volumeAttributesClassScopedLister can list all VolumeAttributesClasses inside a workspace +// or scope down to a listersstoragev1.VolumeAttributesClassNamespaceLister. +type volumeAttributesClassScopedLister struct { + kcplisters.ResourceIndexer[*storagev1.VolumeAttributesClass] +} diff --git a/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/dynamic/simple.go b/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/dynamic/simple.go index 8330942b710..2a75d644640 100644 --- a/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/dynamic/simple.go +++ b/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/dynamic/simple.go @@ -21,7 +21,6 @@ import ( "context" "fmt" "net/http" - "time" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -34,9 +33,6 @@ import ( "k8s.io/client-go/features" "k8s.io/client-go/rest" "k8s.io/client-go/util/apply" - "k8s.io/client-go/util/consistencydetector" - "k8s.io/client-go/util/watchlist" - "k8s.io/klog/v2" ) type DynamicClient struct { @@ -287,24 +283,6 @@ func (c *dynamicResourceClient) Get(ctx context.Context, name string, opts metav } func (c *dynamicResourceClient) List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - if watchListOptions, hasWatchListOptionsPrepared, watchListOptionsErr := watchlist.PrepareWatchListOptionsFromListOptions(opts); watchListOptionsErr != nil { - klog.Warningf("Failed preparing watchlist options for %v, falling back to the standard LIST semantics, err = %v", c.resource, watchListOptionsErr) - } else if hasWatchListOptionsPrepared { - result, err := c.watchList(ctx, watchListOptions) - if err == nil { - consistencydetector.CheckWatchListFromCacheDataConsistencyIfRequested(ctx, fmt.Sprintf("watchlist request for %v", c.resource), c.list, opts, result) - return result, nil - } - klog.Warningf("The watchlist request for %v ended with an error, falling back to the standard LIST semantics, err = %v", c.resource, err) - } - result, err := c.list(ctx, opts) - if err == nil { - consistencydetector.CheckListFromCacheDataConsistencyIfRequested(ctx, fmt.Sprintf("list request for %v", c.resource), c.list, opts, result) - } - return result, err -} - -func (c *dynamicResourceClient) list(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { if err := validateNamespaceWithOptionalName(c.namespace); err != nil { return nil, err } @@ -319,27 +297,6 @@ func (c *dynamicResourceClient) list(ctx context.Context, opts metav1.ListOption return &out, nil } -// watchList establishes a watch stream with the server and returns an unstructured list. -func (c *dynamicResourceClient) watchList(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error) { - if err := validateNamespaceWithOptionalName(c.namespace); err != nil { - return nil, err - } - - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - - result := &unstructured.UnstructuredList{} - err := c.client.client.Get().AbsPath(c.makeURLSegments("")...). - SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1). - Timeout(timeout). - WatchList(ctx). - Into(result) - - return result, err -} - func (c *dynamicResourceClient) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { opts.Watch = true if err := validateNamespaceWithOptionalName(c.namespace); err != nil { diff --git a/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing/fixture.go b/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing/fixture.go index 694449984b6..dbe29ff2448 100644 --- a/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing/fixture.go +++ b/staging/src/github.com/kcp-dev/client-go/third_party/k8s.io/client-go/testing/fixture.go @@ -25,7 +25,7 @@ import ( "sync" jsonpatch "gopkg.in/evanphx/json-patch.v4" - "sigs.k8s.io/structured-merge-diff/v4/typed" + "sigs.k8s.io/structured-merge-diff/v6/typed" "sigs.k8s.io/yaml" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/go.mod b/staging/src/github.com/kcp-dev/code-generator/examples/go.mod index 05aafbb4a35..bde699ab14c 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/go.mod +++ b/staging/src/github.com/kcp-dev/code-generator/examples/go.mod @@ -8,31 +8,34 @@ require ( github.com/kcp-dev/apimachinery/v2 v2.0.0-00010101000000-000000000000 github.com/kcp-dev/client-go v0.0.0 github.com/kcp-dev/logicalcluster/v3 v3.0.5 - k8s.io/apimachinery v0.33.5 - k8s.io/client-go v0.33.5 - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 + k8s.io/apimachinery v0.34.2 + k8s.io/client-go v0.34.2 + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 ) require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.1 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.2 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.9.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/x448/float16 v0.8.4 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/net v0.40.0 // indirect golang.org/x/oauth2 v0.29.0 // indirect golang.org/x/sys v0.33.0 // indirect @@ -43,13 +46,13 @@ require ( 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.33.5 // indirect + k8s.io/api v0.34.2 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/randfill v1.0.0 // indirect - sigs.k8s.io/yaml v1.4.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) replace ( diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/go.sum b/staging/src/github.com/kcp-dev/code-generator/examples/go.sum index a6ee8d4cd97..121ef9a2167 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/go.sum +++ b/staging/src/github.com/kcp-dev/code-generator/examples/go.sum @@ -2,10 +2,10 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= @@ -18,9 +18,8 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= 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= @@ -45,8 +44,9 @@ github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUt github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= @@ -74,6 +74,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -124,24 +128,23 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 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.33.5 h1:YR+uhYj05jdRpcksv8kjSliW+v9hwXxn6Cv10aR8Juw= -k8s.io/api v0.33.5/go.mod h1:2gzShdwXKT5yPGiqrTrn/U/nLZ7ZyT4WuAj3XGDVgVs= -k8s.io/apimachinery v0.33.5 h1:NiT64hln4TQXeYR18/ES39OrNsjGz8NguxsBgp+6QIo= -k8s.io/apimachinery v0.33.5/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/client-go v0.33.5 h1:I8BdmQGxInpkMEnJvV6iG7dqzP3JRlpZZlib3OMFc3o= -k8s.io/client-go v0.33.5/go.mod h1:W8PQP4MxbM4ypgagVE65mUUqK1/ByQkSALF9tzuQ6u0= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= 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-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go index ffc4f8774ab..527ea19b61c 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v1") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/testtype.go index 194cef1efa7..5ede07b3709 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v1") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go index 19bf83a8ce9..4aec2c4a691 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1/withoutverbtype.go @@ -41,6 +41,7 @@ func WithoutVerbType(name, namespace string) *WithoutVerbTypeApplyConfiguration b.WithAPIVersion("example.dev/v1") return b } +func (b WithoutVerbTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -200,8 +201,24 @@ func (b *WithoutVerbTypeApplyConfiguration) ensureObjectMetaApplyConfigurationEx } } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *WithoutVerbTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *WithoutVerbTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *WithoutVerbTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *WithoutVerbTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go index f70e0847329..0598b2c8821 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v1alpha1") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go index 1b3432b7ba9..912b9d7a2e3 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1alpha1/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v1alpha1") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go index 73479205404..b18a6eb5353 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v1beta1") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go index 32ac250fd25..39f03f68fd5 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v1beta1/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v1beta1") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go index 1e535c5be8c..2c4730d449c 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v2") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/testtype.go index 01019f9ab9d..6a1fe9997bb 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example/v2/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("example.dev/v2") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/clustertesttype.go index 539af2118d6..e61036ce018 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("example3.some.corp/v1") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/testtype.go index 5330929f538..8762b1f060f 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/example3/v1/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("example3.some.corp/v1") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/clustertesttype.go index 15fced8cff8..e2bbeeee758 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("example-dashed.some.corp/v1") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/testtype.go index 78e62e25dd4..7d11a9b1d6c 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/exampledashed/v1/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("example-dashed.some.corp/v1") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/clustertesttype.go index ee17dcc1ab9..5c8e897950c 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("existinginterfaces.acme.corp/v1") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/testtype.go index e4831aa566c..393d2bfb978 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/existinginterfaces/v1/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("existinginterfaces.acme.corp/v1") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/internal/internal.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/internal/internal.go index 86ad90aa9fd..e660b0001de 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/internal/internal.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/internal/internal.go @@ -22,7 +22,7 @@ import ( fmt "fmt" sync "sync" - typed "sigs.k8s.io/structured-merge-diff/v4/typed" + typed "sigs.k8s.io/structured-merge-diff/v6/typed" ) func Parser() *typed.Parser { diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go index c468e201b7e..747c5e2bcf6 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/clustertesttype.go @@ -43,6 +43,7 @@ func ClusterTestType(name string) *ClusterTestTypeApplyConfiguration { b.WithAPIVersion("secondexample.dev/v1") return b } +func (b ClusterTestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -226,8 +227,24 @@ func (b *ClusterTestTypeApplyConfiguration) WithStatus(value *ClusterTestTypeSta return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ClusterTestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterTestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go index 82e1fddbe0a..051fcfc5711 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/secondexample/v1/testtype.go @@ -42,6 +42,7 @@ func TestType(name, namespace string) *TestTypeApplyConfiguration { b.WithAPIVersion("secondexample.dev/v1") return b } +func (b TestTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -211,8 +212,24 @@ func (b *TestTypeApplyConfiguration) WithAPIGroups(values ...string) *TestTypeAp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *TestTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *TestTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/utils.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/utils.go index b08a518eb45..5169b50e02c 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/utils.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/applyconfigurations/utils.go @@ -39,7 +39,7 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" - testing "k8s.io/client-go/testing" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" ) // ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no @@ -116,6 +116,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return nil } -func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter { - return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()} +func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter { + return managedfields.NewSchemeTypeConverter(scheme, internal.Parser()) } diff --git a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/clientset/versioned/fake/clientset_generated.go b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/clientset/versioned/fake/clientset_generated.go index 31254267b3b..56de831bf69 100644 --- a/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/clientset/versioned/fake/clientset_generated.go +++ b/staging/src/github.com/kcp-dev/code-generator/examples/pkg/generated/clientset/versioned/fake/clientset_generated.go @@ -120,8 +120,8 @@ func NewClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() diff --git a/staging/src/github.com/kcp-dev/code-generator/go.mod b/staging/src/github.com/kcp-dev/code-generator/go.mod index af8f42c4190..7eb1a75026e 100644 --- a/staging/src/github.com/kcp-dev/code-generator/go.mod +++ b/staging/src/github.com/kcp-dev/code-generator/go.mod @@ -5,8 +5,8 @@ go 1.24.0 require ( github.com/spf13/pflag v1.0.6 golang.org/x/text v0.25.0 - k8s.io/code-generator v0.33.3 - k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4 + k8s.io/code-generator v0.34.2 + k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f k8s.io/klog/v2 v2.130.1 ) diff --git a/staging/src/github.com/kcp-dev/code-generator/go.sum b/staging/src/github.com/kcp-dev/code-generator/go.sum index b15ffb151bc..7a12f987d15 100644 --- a/staging/src/github.com/kcp-dev/code-generator/go.sum +++ b/staging/src/github.com/kcp-dev/code-generator/go.sum @@ -12,9 +12,9 @@ golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= -k8s.io/code-generator v0.33.3 h1:6+34LhYkIuQ/yn/E3qlpVqjQaP8smzCu4NE1A8b0LWs= -k8s.io/code-generator v0.33.3/go.mod h1:6Y02+HQJYgNphv9z3wJB5w+sjYDIEBQW7sh62PkufvA= -k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4 h1:iicENHE63xPBlGQeany8LqrH40Wh/48QhMRI/mGVsqA= -k8s.io/gengo/v2 v2.0.0-20250513215321-e3bc6f1e78b4/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/code-generator v0.34.2 h1:9bG6jTxmsU3HXE5BNYJTC8AZ1D6hVVfkm8yYSkdkGY0= +k8s.io/code-generator v0.34.2/go.mod h1:dnDDEd6S/z4uZ+PG1aE58ySCi/lR4+qT3a4DddE4/2I= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q= +k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/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= diff --git a/staging/src/github.com/kcp-dev/sdk/apis/apis/v1alpha2/validation_test.go b/staging/src/github.com/kcp-dev/sdk/apis/apis/v1alpha2/validation_test.go index 6c784b46d37..99785960e9e 100644 --- a/staging/src/github.com/kcp-dev/sdk/apis/apis/v1alpha2/validation_test.go +++ b/staging/src/github.com/kcp-dev/sdk/apis/apis/v1alpha2/validation_test.go @@ -155,10 +155,10 @@ func TestValidateAPIBindingPermissionClaims(t *testing.T) { }, }, wantErrs: []string{ - "spec.permissionClaims[0].selector.matchLabels: Invalid value: v1alpha2.PermissionClaimSelector{LabelSelector:v1.LabelSelector{MatchLabels:map[string]string{\"test\":\"test\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}, MatchAll:true}: matchLabels cannot be used with matchAll", - "spec.permissionClaims[1].selector.matchExpressions: Invalid value: v1alpha2.PermissionClaimSelector{LabelSelector:v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"test\", Operator:\"In\", Values:[]string{\"test\"}}}}, MatchAll:true}: matchExpressions cannot be used with matchAll", - "spec.permissionClaims[2].selector.matchExpressions: Invalid value: v1alpha2.PermissionClaimSelector{LabelSelector:v1.LabelSelector{MatchLabels:map[string]string{\"test\":\"test\"}, MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"test\", Operator:\"In\", Values:[]string{\"test\"}}}}, MatchAll:true}: matchExpressions cannot be used with matchAll", - "spec.permissionClaims[2].selector.matchLabels: Invalid value: v1alpha2.PermissionClaimSelector{LabelSelector:v1.LabelSelector{MatchLabels:map[string]string{\"test\":\"test\"}, MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"test\", Operator:\"In\", Values:[]string{\"test\"}}}}, MatchAll:true}: matchLabels cannot be used with matchAll", + "spec.permissionClaims[0].selector.matchLabels: Invalid value: {\"matchLabels\":{\"test\":\"test\"},\"matchAll\":true}: matchLabels cannot be used with matchAll", + "spec.permissionClaims[1].selector.matchExpressions: Invalid value: {\"matchExpressions\":[{\"key\":\"test\",\"operator\":\"In\",\"values\":[\"test\"]}],\"matchAll\":true}: matchExpressions cannot be used with matchAll", + "spec.permissionClaims[2].selector.matchExpressions: Invalid value: {\"matchLabels\":{\"test\":\"test\"},\"matchExpressions\":[{\"key\":\"test\",\"operator\":\"In\",\"values\":[\"test\"]}],\"matchAll\":true}: matchExpressions cannot be used with matchAll", + "spec.permissionClaims[2].selector.matchLabels: Invalid value: {\"matchLabels\":{\"test\":\"test\"},\"matchExpressions\":[{\"key\":\"test\",\"operator\":\"In\",\"values\":[\"test\"]}],\"matchAll\":true}: matchLabels cannot be used with matchAll", }, }, } diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apibinding.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apibinding.go index 432ad11f17b..b7efcd97b68 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apibinding.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apibinding.go @@ -43,6 +43,7 @@ func APIBinding(name string) *APIBindingApplyConfiguration { b.WithAPIVersion("apis.kcp.io/v1alpha1") return b } +func (b APIBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *APIBindingApplyConfiguration) WithStatus(value *APIBindingStatusApplyCo return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *APIBindingApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *APIBindingApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *APIBindingApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiconversion.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiconversion.go index 83ac04b4b7d..2aaf4088235 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiconversion.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiconversion.go @@ -42,6 +42,7 @@ func APIConversion(name string) *APIConversionApplyConfiguration { b.WithAPIVersion("apis.kcp.io/v1alpha1") return b } +func (b APIConversionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -209,8 +210,24 @@ func (b *APIConversionApplyConfiguration) WithSpec(value *APIConversionSpecApply return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *APIConversionApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *APIConversionApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIConversionApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *APIConversionApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexport.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexport.go index dadd7994be5..87c6b2f59b1 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexport.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexport.go @@ -43,6 +43,7 @@ func APIExport(name string) *APIExportApplyConfiguration { b.WithAPIVersion("apis.kcp.io/v1alpha1") return b } +func (b APIExportApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *APIExportApplyConfiguration) WithStatus(value *APIExportStatusApplyConf return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *APIExportApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *APIExportApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIExportApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *APIExportApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexportendpointslice.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexportendpointslice.go index 7a4b8a46d99..29d31e003fa 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexportendpointslice.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiexportendpointslice.go @@ -43,6 +43,7 @@ func APIExportEndpointSlice(name string) *APIExportEndpointSliceApplyConfigurati b.WithAPIVersion("apis.kcp.io/v1alpha1") return b } +func (b APIExportEndpointSliceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *APIExportEndpointSliceApplyConfiguration) WithStatus(value *APIExportEn return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *APIExportEndpointSliceApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *APIExportEndpointSliceApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIExportEndpointSliceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *APIExportEndpointSliceApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschema.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschema.go index 764e71fc9bf..8cb8d94a182 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschema.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha1/apiresourceschema.go @@ -42,6 +42,7 @@ func APIResourceSchema(name string) *APIResourceSchemaApplyConfiguration { b.WithAPIVersion("apis.kcp.io/v1alpha1") return b } +func (b APIResourceSchemaApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -209,8 +210,24 @@ func (b *APIResourceSchemaApplyConfiguration) WithSpec(value *APIResourceSchemaS return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *APIResourceSchemaApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *APIResourceSchemaApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIResourceSchemaApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *APIResourceSchemaApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apibinding.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apibinding.go index 2bc8220951d..ea666c34fc4 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apibinding.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apibinding.go @@ -43,6 +43,7 @@ func APIBinding(name string) *APIBindingApplyConfiguration { b.WithAPIVersion("apis.kcp.io/v1alpha2") return b } +func (b APIBindingApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *APIBindingApplyConfiguration) WithStatus(value *APIBindingStatusApplyCo return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *APIBindingApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *APIBindingApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIBindingApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *APIBindingApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apiexport.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apiexport.go index 96d2b8db36e..526a7c8be9c 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apiexport.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/apis/v1alpha2/apiexport.go @@ -43,6 +43,7 @@ func APIExport(name string) *APIExportApplyConfiguration { b.WithAPIVersion("apis.kcp.io/v1alpha2") return b } +func (b APIExportApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *APIExportApplyConfiguration) WithStatus(value *APIExportStatusApplyConf return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *APIExportApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *APIExportApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *APIExportApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *APIExportApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedobject.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedobject.go index 038c87c07b2..b9903cc7d34 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedobject.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedobject.go @@ -42,6 +42,7 @@ func CachedObject(name string) *CachedObjectApplyConfiguration { b.WithAPIVersion("cache.kcp.io/v1alpha1") return b } +func (b CachedObjectApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -209,8 +210,24 @@ func (b *CachedObjectApplyConfiguration) WithSpec(value *CachedObjectSpecApplyCo return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *CachedObjectApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *CachedObjectApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *CachedObjectApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *CachedObjectApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresource.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresource.go index e7c1d5e9753..43804658948 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresource.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresource.go @@ -43,6 +43,7 @@ func CachedResource(name string) *CachedResourceApplyConfiguration { b.WithAPIVersion("cache.kcp.io/v1alpha1") return b } +func (b CachedResourceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *CachedResourceApplyConfiguration) WithStatus(value *CachedResourceStatu return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *CachedResourceApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *CachedResourceApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *CachedResourceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *CachedResourceApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresourceendpointslice.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresourceendpointslice.go index 6d2c5a0c0df..620d667792f 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresourceendpointslice.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/cache/v1alpha1/cachedresourceendpointslice.go @@ -43,6 +43,7 @@ func CachedResourceEndpointSlice(name string) *CachedResourceEndpointSliceApplyC b.WithAPIVersion("cache.kcp.io/v1alpha1") return b } +func (b CachedResourceEndpointSliceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *CachedResourceEndpointSliceApplyConfiguration) WithStatus(value *Cached return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *CachedResourceEndpointSliceApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *CachedResourceEndpointSliceApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *CachedResourceEndpointSliceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *CachedResourceEndpointSliceApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/logicalcluster.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/logicalcluster.go index c7d5fda1f04..9d365776240 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/logicalcluster.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/logicalcluster.go @@ -43,6 +43,7 @@ func LogicalCluster(name string) *LogicalClusterApplyConfiguration { b.WithAPIVersion("core.kcp.io/v1alpha1") return b } +func (b LogicalClusterApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *LogicalClusterApplyConfiguration) WithStatus(value *LogicalClusterStatu return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *LogicalClusterApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *LogicalClusterApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *LogicalClusterApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *LogicalClusterApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/shard.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/shard.go index 9eeae44b350..ed16dcd4cf1 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/shard.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/core/v1alpha1/shard.go @@ -43,6 +43,7 @@ func Shard(name string) *ShardApplyConfiguration { b.WithAPIVersion("core.kcp.io/v1alpha1") return b } +func (b ShardApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *ShardApplyConfiguration) WithStatus(value *ShardStatusApplyConfiguratio return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ShardApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ShardApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *ShardApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ShardApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/internal/internal.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/internal/internal.go index 86ad90aa9fd..e660b0001de 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/internal/internal.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/internal/internal.go @@ -22,7 +22,7 @@ import ( fmt "fmt" sync "sync" - typed "sigs.k8s.io/structured-merge-diff/v4/typed" + typed "sigs.k8s.io/structured-merge-diff/v6/typed" ) func Parser() *typed.Parser { diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/deleteoptions.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/deleteoptions.go index 6d3742f2683..ab9766fd4a3 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/deleteoptions.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/deleteoptions.go @@ -42,6 +42,7 @@ func DeleteOptions() *DeleteOptionsApplyConfiguration { b.WithAPIVersion("meta.k8s.io/v1") return b } +func (b DeleteOptionsApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -108,3 +109,13 @@ func (b *DeleteOptionsApplyConfiguration) WithIgnoreStoreReadErrorWithClusterBre b.IgnoreStoreReadErrorWithClusterBreakingPotential = &value return b } + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *DeleteOptionsApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *DeleteOptionsApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/objectmeta.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/objectmeta.go index 38633e00884..071d4e61067 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/objectmeta.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/objectmeta.go @@ -174,3 +174,8 @@ func (b *ObjectMetaApplyConfiguration) WithFinalizers(values ...string) *ObjectM func (b *ObjectMetaApplyConfiguration) GetName() *string { return b.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ObjectMetaApplyConfiguration) GetNamespace() *string { + return b.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/typemeta.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/typemeta.go index 58c56d67ce4..2fb56e815f3 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/typemeta.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/meta/v1/typemeta.go @@ -46,3 +46,13 @@ func (b *TypeMetaApplyConfiguration) WithAPIVersion(value string) *TypeMetaApply b.APIVersion = &value return b } + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TypeMetaApplyConfiguration) GetKind() *string { + return b.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TypeMetaApplyConfiguration) GetAPIVersion() *string { + return b.APIVersion +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspace.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspace.go index 414c502e121..66e57f1629f 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspace.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspace.go @@ -43,6 +43,7 @@ func Workspace(name string) *WorkspaceApplyConfiguration { b.WithAPIVersion("tenancy.kcp.io/v1alpha1") return b } +func (b WorkspaceApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *WorkspaceApplyConfiguration) WithStatus(value *WorkspaceStatusApplyConf return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *WorkspaceApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *WorkspaceApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *WorkspaceApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *WorkspaceApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspaceauthenticationconfiguration.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspaceauthenticationconfiguration.go index b229662c86d..603da643e41 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspaceauthenticationconfiguration.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspaceauthenticationconfiguration.go @@ -42,6 +42,7 @@ func WorkspaceAuthenticationConfiguration(name string) *WorkspaceAuthenticationC b.WithAPIVersion("tenancy.kcp.io/v1alpha1") return b } +func (b WorkspaceAuthenticationConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -209,8 +210,24 @@ func (b *WorkspaceAuthenticationConfigurationApplyConfiguration) WithSpec(value return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *WorkspaceAuthenticationConfigurationApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *WorkspaceAuthenticationConfigurationApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *WorkspaceAuthenticationConfigurationApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *WorkspaceAuthenticationConfigurationApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspacetype.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspacetype.go index b9bbb559241..831f5e368f5 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspacetype.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/tenancy/v1alpha1/workspacetype.go @@ -43,6 +43,7 @@ func WorkspaceType(name string) *WorkspaceTypeApplyConfiguration { b.WithAPIVersion("tenancy.kcp.io/v1alpha1") return b } +func (b WorkspaceTypeApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *WorkspaceTypeApplyConfiguration) WithStatus(value *WorkspaceTypeStatusA return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *WorkspaceTypeApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *WorkspaceTypeApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *WorkspaceTypeApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *WorkspaceTypeApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partition.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partition.go index 8cef35aff4b..2b8fec613bd 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partition.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partition.go @@ -42,6 +42,7 @@ func Partition(name string) *PartitionApplyConfiguration { b.WithAPIVersion("topology.kcp.io/v1alpha1") return b } +func (b PartitionApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -209,8 +210,24 @@ func (b *PartitionApplyConfiguration) WithSpec(value *PartitionSpecApplyConfigur return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *PartitionApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *PartitionApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *PartitionApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *PartitionApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partitionset.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partitionset.go index 831f3a1ca09..5563fff6507 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partitionset.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/topology/v1alpha1/partitionset.go @@ -43,6 +43,7 @@ func PartitionSet(name string) *PartitionSetApplyConfiguration { b.WithAPIVersion("topology.kcp.io/v1alpha1") return b } +func (b PartitionSetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *PartitionSetApplyConfiguration) WithStatus(value *PartitionSetStatusApp return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *PartitionSetApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *PartitionSetApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *PartitionSetApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *PartitionSetApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/utils.go b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/utils.go index 5b63fcd1e84..8ae2d781f8e 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/utils.go +++ b/staging/src/github.com/kcp-dev/sdk/client/applyconfiguration/utils.go @@ -22,8 +22,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" - testing "k8s.io/client-go/testing" v1alpha1 "github.com/kcp-dev/sdk/apis/apis/v1alpha1" v1alpha2 "github.com/kcp-dev/sdk/apis/apis/v1alpha2" @@ -289,6 +289,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return nil } -func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter { - return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()} +func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter { + return managedfields.NewSchemeTypeConverter(scheme, internal.Parser()) } diff --git a/staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/fake/clientset_generated.go b/staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/fake/clientset_generated.go index 6481f214189..fdb62f70cc8 100644 --- a/staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/fake/clientset_generated.go +++ b/staging/src/github.com/kcp-dev/sdk/client/clientset/versioned/fake/clientset_generated.go @@ -116,8 +116,8 @@ func NewClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() diff --git a/staging/src/github.com/kcp-dev/sdk/go.mod b/staging/src/github.com/kcp-dev/sdk/go.mod index 3540fca2820..4f3dd100391 100644 --- a/staging/src/github.com/kcp-dev/sdk/go.mod +++ b/staging/src/github.com/kcp-dev/sdk/go.mod @@ -20,21 +20,21 @@ require ( github.com/stretchr/testify v1.10.0 golang.org/x/sync v0.14.0 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.33.5 - k8s.io/apiextensions-apiserver v0.33.3 - k8s.io/apimachinery v0.33.5 - k8s.io/apiserver v0.33.3 - k8s.io/client-go v0.33.5 - k8s.io/component-base v0.33.3 + k8s.io/api v0.34.2 + k8s.io/apiextensions-apiserver v0.34.2 + k8s.io/apimachinery v0.34.2 + k8s.io/apiserver v0.34.2 + k8s.io/client-go v0.34.2 + k8s.io/component-base v0.34.2 k8s.io/klog/v2 v2.130.1 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 sigs.k8s.io/randfill v1.0.0 - sigs.k8s.io/structured-merge-diff/v4 v4.6.0 - sigs.k8s.io/yaml v1.4.0 + sigs.k8s.io/structured-merge-diff/v6 v6.3.0 + sigs.k8s.io/yaml v1.6.0 ) require ( - cel.dev/expr v0.19.1 // indirect + cel.dev/expr v0.24.0 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect @@ -45,10 +45,10 @@ require ( github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/emicklei/go-restful/v3 v3.12.1 // indirect + github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/fsnotify/fsnotify v1.9.0 // indirect + github.com/fxamacker/cbor/v2 v2.9.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.21.0 // indirect @@ -56,11 +56,11 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.1.3 // indirect - github.com/google/cel-go v0.23.2 // indirect - github.com/google/gnostic-models v0.6.9 // indirect + github.com/google/cel-go v0.26.0 // indirect + github.com/google/gnostic-models v0.7.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -69,7 +69,7 @@ require ( github.com/mattn/go-runewidth v0.0.12 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -80,21 +80,23 @@ require ( github.com/rivo/uniseg v0.2.0 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/x448/float16 v0.8.4 // indirect - go.etcd.io/etcd/api/v3 v3.5.21 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.21 // indirect - go.etcd.io/etcd/client/v3 v3.5.21 // indirect + go.etcd.io/etcd/api/v3 v3.6.4 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.6.4 // indirect + go.etcd.io/etcd/client/v3 v3.6.4 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect - go.opentelemetry.io/otel v1.33.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect - go.opentelemetry.io/otel/metric v1.33.0 // indirect - go.opentelemetry.io/otel/sdk v1.33.0 // indirect - go.opentelemetry.io/otel/trace v1.33.0 // indirect - go.opentelemetry.io/proto/otlp v1.4.0 // indirect + go.opentelemetry.io/otel v1.35.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect + go.opentelemetry.io/otel/metric v1.35.0 // indirect + go.opentelemetry.io/otel/sdk v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.35.0 // indirect + go.opentelemetry.io/proto/otlp v1.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/crypto v0.38.0 // indirect golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect golang.org/x/net v0.40.0 // indirect @@ -103,13 +105,13 @@ require ( golang.org/x/term v0.32.0 // indirect golang.org/x/text v0.25.0 // indirect golang.org/x/time v0.11.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect - google.golang.org/grpc v1.69.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect + google.golang.org/grpc v1.72.1 // indirect google.golang.org/protobuf v1.36.5 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect + k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect ) diff --git a/staging/src/github.com/kcp-dev/sdk/go.sum b/staging/src/github.com/kcp-dev/sdk/go.sum index 5cab92bb22f..7e54ec531fd 100644 --- a/staging/src/github.com/kcp-dev/sdk/go.sum +++ b/staging/src/github.com/kcp-dev/sdk/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= -cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ= @@ -33,14 +33,14 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/egymgmbh/go-prefix-writer v0.0.0-20180609083313-7326ea162eca h1:7oodhZp9MZW0DBkrZXyUsJWKQFy35SVxjZ8K4vHXnk8= github.com/egymgmbh/go-prefix-writer v0.0.0-20180609083313-7326ea162eca/go.mod h1:UhMFM+dnOcm1f0Pve8uqRaxAhEYki+/CuA2BTDp2T04= -github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= -github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= +github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= -github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k= +github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= +github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -59,17 +59,16 @@ github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= -github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8= +github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= -github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= -github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= -github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= -github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= +github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= +github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= +github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ= 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= @@ -79,18 +78,18 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0 h1:FbSCl+KggFl+Ocym490i/EyXF4lPgLoUtcSWquBM0Rs= +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= -github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I= +github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -118,8 +117,9 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8= +github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= @@ -177,50 +177,52 @@ github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chq github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= -go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= -go.etcd.io/etcd/api/v3 v3.5.21 h1:A6O2/JDb3tvHhiIz3xf9nJ7REHvtEFJJ3veW3FbCnS8= -go.etcd.io/etcd/api/v3 v3.5.21/go.mod h1:c3aH5wcvXv/9dqIw2Y810LDXJfhSYdHQ0vxmP3CCHVY= -go.etcd.io/etcd/client/pkg/v3 v3.5.21 h1:lPBu71Y7osQmzlflM9OfeIV2JlmpBjqBNlLtcoBqUTc= -go.etcd.io/etcd/client/pkg/v3 v3.5.21/go.mod h1:BgqT/IXPjK9NkeSDjbzwsHySX3yIle2+ndz28nVsjUs= -go.etcd.io/etcd/client/v2 v2.305.21 h1:eLiFfexc2mE+pTLz9WwnoEsX5JTTpLCYVivKkmVXIRA= -go.etcd.io/etcd/client/v2 v2.305.21/go.mod h1:OKkn4hlYNf43hpjEM3Ke3aRdUkhSl8xjKjSf8eCq2J8= -go.etcd.io/etcd/client/v3 v3.5.21 h1:T6b1Ow6fNjOLOtM0xSoKNQt1ASPCLWrF9XMHcH9pEyY= -go.etcd.io/etcd/client/v3 v3.5.21/go.mod h1:mFYy67IOqmbRf/kRUvsHixzo3iG+1OF2W2+jVIQRAnU= -go.etcd.io/etcd/pkg/v3 v3.5.21 h1:jUItxeKyrDuVuWhdh0HtjUANwyuzcb7/FAeUfABmQsk= -go.etcd.io/etcd/pkg/v3 v3.5.21/go.mod h1:wpZx8Egv1g4y+N7JAsqi2zoUiBIUWznLjqJbylDjWgU= -go.etcd.io/etcd/raft/v3 v3.5.21 h1:dOmE0mT55dIUsX77TKBLq+RgyumsQuYeiRQnW/ylugk= -go.etcd.io/etcd/raft/v3 v3.5.21/go.mod h1:fmcuY5R2SNkklU4+fKVBQi2biVp5vafMrWUEj4TJ4Cs= -go.etcd.io/etcd/server/v3 v3.5.21 h1:9w0/k12majtgarGmlMVuhwXRI2ob3/d1Ik3X5TKo0yU= -go.etcd.io/etcd/server/v3 v3.5.21/go.mod h1:G1mOzdwuzKT1VRL7SqRchli/qcFrtLBTAQ4lV20sXXo= +go.etcd.io/bbolt v1.4.2 h1:IrUHp260R8c+zYx/Tm8QZr04CX+qWS5PGfPdevhdm1I= +go.etcd.io/bbolt v1.4.2/go.mod h1:Is8rSHO/b4f3XigBC0lL0+4FwAQv3HXEEIgFMuKHceM= +go.etcd.io/etcd/api/v3 v3.6.4 h1:7F6N7toCKcV72QmoUKa23yYLiiljMrT4xCeBL9BmXdo= +go.etcd.io/etcd/api/v3 v3.6.4/go.mod h1:eFhhvfR8Px1P6SEuLT600v+vrhdDTdcfMzmnxVXXSbk= +go.etcd.io/etcd/client/pkg/v3 v3.6.4 h1:9HBYrjppeOfFjBjaMTRxT3R7xT0GLK8EJMVC4xg6ok0= +go.etcd.io/etcd/client/pkg/v3 v3.6.4/go.mod h1:sbdzr2cl3HzVmxNw//PH7aLGVtY4QySjQFuaCgcRFAI= +go.etcd.io/etcd/client/v3 v3.6.4 h1:YOMrCfMhRzY8NgtzUsHl8hC2EBSnuqbR3dh84Uryl7A= +go.etcd.io/etcd/client/v3 v3.6.4/go.mod h1:jaNNHCyg2FdALyKWnd7hxZXZxZANb0+KGY+YQaEMISo= +go.etcd.io/etcd/pkg/v3 v3.6.4 h1:fy8bmXIec1Q35/jRZ0KOes8vuFxbvdN0aAFqmEfJZWA= +go.etcd.io/etcd/pkg/v3 v3.6.4/go.mod h1:kKcYWP8gHuBRcteyv6MXWSN0+bVMnfgqiHueIZnKMtE= +go.etcd.io/etcd/server/v3 v3.6.4 h1:LsCA7CzjVt+8WGrdsnh6RhC0XqCsLkBly3ve5rTxMAU= +go.etcd.io/etcd/server/v3 v3.6.4/go.mod h1:aYCL/h43yiONOv0QIR82kH/2xZ7m+IWYjzRmyQfnCAg= +go.etcd.io/raft/v3 v3.6.0 h1:5NtvbDVYpnfZWcIHgGRk9DyzkBIXOi8j+DDp1IcnUWQ= +go.etcd.io/raft/v3 v3.6.0/go.mod h1:nLvLevg6+xrVtHUmVaTcTz603gQPHfh7kUAwV6YpfGo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= -go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= -go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= -go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= -go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= -go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= -go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= -go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= -go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= -go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= -go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= -go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= +go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= +go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= +go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= +go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= +go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= +go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= +go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= +go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= +go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= +go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= +go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= +go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -268,14 +270,12 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= -google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= -google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= -google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= +google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA= +google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -290,34 +290,33 @@ gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYs 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.33.5 h1:YR+uhYj05jdRpcksv8kjSliW+v9hwXxn6Cv10aR8Juw= -k8s.io/api v0.33.5/go.mod h1:2gzShdwXKT5yPGiqrTrn/U/nLZ7ZyT4WuAj3XGDVgVs= -k8s.io/apiextensions-apiserver v0.33.3 h1:qmOcAHN6DjfD0v9kxL5udB27SRP6SG/MTopmge3MwEs= -k8s.io/apiextensions-apiserver v0.33.3/go.mod h1:oROuctgo27mUsyp9+Obahos6CWcMISSAPzQ77CAQGz8= -k8s.io/apimachinery v0.33.5 h1:NiT64hln4TQXeYR18/ES39OrNsjGz8NguxsBgp+6QIo= -k8s.io/apimachinery v0.33.5/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= -k8s.io/apiserver v0.33.3 h1:Wv0hGc+QFdMJB4ZSiHrCgN3zL3QRatu56+rpccKC3J4= -k8s.io/apiserver v0.33.3/go.mod h1:05632ifFEe6TxwjdAIrwINHWE2hLwyADFk5mBsQa15E= -k8s.io/client-go v0.33.5 h1:I8BdmQGxInpkMEnJvV6iG7dqzP3JRlpZZlib3OMFc3o= -k8s.io/client-go v0.33.5/go.mod h1:W8PQP4MxbM4ypgagVE65mUUqK1/ByQkSALF9tzuQ6u0= -k8s.io/component-base v0.33.3 h1:mlAuyJqyPlKZM7FyaoM/LcunZaaY353RXiOd2+B5tGA= -k8s.io/component-base v0.33.3/go.mod h1:ktBVsBzkI3imDuxYXmVxZ2zxJnYTZ4HAsVj9iF09qp4= +k8s.io/api v0.34.2 h1:fsSUNZhV+bnL6Aqrp6O7lMTy6o5x2C4XLjnh//8SLYY= +k8s.io/api v0.34.2/go.mod h1:MMBPaWlED2a8w4RSeanD76f7opUoypY8TFYkSM+3XHw= +k8s.io/apiextensions-apiserver v0.34.2 h1:WStKftnGeoKP4AZRz/BaAAEJvYp4mlZGN0UCv+uvsqo= +k8s.io/apiextensions-apiserver v0.34.2/go.mod h1:398CJrsgXF1wytdaanynDpJ67zG4Xq7yj91GrmYN2SE= +k8s.io/apimachinery v0.34.2 h1:zQ12Uk3eMHPxrsbUJgNF8bTauTVR2WgqJsTmwTE/NW4= +k8s.io/apimachinery v0.34.2/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw= +k8s.io/apiserver v0.34.2 h1:2/yu8suwkmES7IzwlehAovo8dDE07cFRC7KMDb1+MAE= +k8s.io/apiserver v0.34.2/go.mod h1:gqJQy2yDOB50R3JUReHSFr+cwJnL8G1dzTA0YLEqAPI= +k8s.io/client-go v0.34.2 h1:Co6XiknN+uUZqiddlfAjT68184/37PS4QAzYvQvDR8M= +k8s.io/client-go v0.34.2/go.mod h1:2VYDl1XXJsdcAxw7BenFslRQX28Dxz91U9MWKjX97fE= +k8s.io/component-base v0.34.2 h1:HQRqK9x2sSAsd8+R4xxRirlTjowsg6fWCPwWYeSvogQ= +k8s.io/component-base v0.34.2/go.mod h1:9xw2FHJavUHBFpiGkZoKuYZ5pdtLKe97DEByaA+hHbM= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kms v0.33.3 h1:7cQWC+GSH211NgY8LRKjBXNtkzra5SkpYzeZrOt5D+8= -k8s.io/kms v0.33.3/go.mod h1:C1I8mjFFBNzfUZXYt9FZVJ8MJl7ynFbGgZFbBzkBJ3E= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4= -k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8= +k8s.io/kms v0.34.2 h1:91rj4MDZLyIT9KxG8J5/CcMH666Z88CF/xJQeuPfJc8= +k8s.io/kms v0.34.2/go.mod h1:s1CFkLG7w9eaTYvctOxosx88fl4spqmixnNpys0JAtM= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA= +k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y= k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc= -sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps= -sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= -sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco= +sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/test/e2e/apibinding/apibinding_deletion_test.go b/test/e2e/apibinding/apibinding_deletion_test.go index 08f3d24d2ae..b5c480e0c8b 100644 --- a/test/e2e/apibinding/apibinding_deletion_test.go +++ b/test/e2e/apibinding/apibinding_deletion_test.go @@ -223,7 +223,7 @@ func TestAPIBindingDeletion(t *testing.T) { }, } _, err = cowboyClient.Create(ctx, cowboyDenied, metav1.CreateOptions{}) - require.Equal(t, apierrors.IsMethodNotSupported(err), true) + require.Equal(t, apierrors.IsForbidden(err), true) t.Logf("Clean finalizer to remove the cowboy") err = retry.RetryOnConflict(retry.DefaultBackoff, func() error { diff --git a/test/e2e/fixtures/wildwest/client/applyconfiguration/internal/internal.go b/test/e2e/fixtures/wildwest/client/applyconfiguration/internal/internal.go index 86ad90aa9fd..e660b0001de 100644 --- a/test/e2e/fixtures/wildwest/client/applyconfiguration/internal/internal.go +++ b/test/e2e/fixtures/wildwest/client/applyconfiguration/internal/internal.go @@ -22,7 +22,7 @@ import ( fmt "fmt" sync "sync" - typed "sigs.k8s.io/structured-merge-diff/v4/typed" + typed "sigs.k8s.io/structured-merge-diff/v6/typed" ) func Parser() *typed.Parser { diff --git a/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/deleteoptions.go b/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/deleteoptions.go index 6d3742f2683..ab9766fd4a3 100644 --- a/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/deleteoptions.go +++ b/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/deleteoptions.go @@ -42,6 +42,7 @@ func DeleteOptions() *DeleteOptionsApplyConfiguration { b.WithAPIVersion("meta.k8s.io/v1") return b } +func (b DeleteOptionsApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -108,3 +109,13 @@ func (b *DeleteOptionsApplyConfiguration) WithIgnoreStoreReadErrorWithClusterBre b.IgnoreStoreReadErrorWithClusterBreakingPotential = &value return b } + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *DeleteOptionsApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *DeleteOptionsApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} diff --git a/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/objectmeta.go b/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/objectmeta.go index 38633e00884..071d4e61067 100644 --- a/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/objectmeta.go +++ b/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/objectmeta.go @@ -174,3 +174,8 @@ func (b *ObjectMetaApplyConfiguration) WithFinalizers(values ...string) *ObjectM func (b *ObjectMetaApplyConfiguration) GetName() *string { return b.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ObjectMetaApplyConfiguration) GetNamespace() *string { + return b.Namespace +} diff --git a/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/typemeta.go b/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/typemeta.go index 58c56d67ce4..2fb56e815f3 100644 --- a/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/typemeta.go +++ b/test/e2e/fixtures/wildwest/client/applyconfiguration/meta/v1/typemeta.go @@ -46,3 +46,13 @@ func (b *TypeMetaApplyConfiguration) WithAPIVersion(value string) *TypeMetaApply b.APIVersion = &value return b } + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *TypeMetaApplyConfiguration) GetKind() *string { + return b.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *TypeMetaApplyConfiguration) GetAPIVersion() *string { + return b.APIVersion +} diff --git a/test/e2e/fixtures/wildwest/client/applyconfiguration/utils.go b/test/e2e/fixtures/wildwest/client/applyconfiguration/utils.go index 6d754fb1899..86f790893f2 100644 --- a/test/e2e/fixtures/wildwest/client/applyconfiguration/utils.go +++ b/test/e2e/fixtures/wildwest/client/applyconfiguration/utils.go @@ -22,8 +22,8 @@ import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" metav1 "k8s.io/client-go/applyconfigurations/meta/v1" - testing "k8s.io/client-go/testing" v1alpha1 "github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/apis/wildwest/v1alpha1" internal "github.com/kcp-dev/kcp/test/e2e/fixtures/wildwest/client/applyconfiguration/internal" @@ -71,6 +71,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return nil } -func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter { - return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()} +func NewTypeConverter(scheme *runtime.Scheme) managedfields.TypeConverter { + return managedfields.NewSchemeTypeConverter(scheme, internal.Parser()) } diff --git a/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/cowboy.go b/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/cowboy.go index aefb71f25b4..f49de4d63c7 100644 --- a/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/cowboy.go +++ b/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/cowboy.go @@ -44,6 +44,7 @@ func Cowboy(name, namespace string) *CowboyApplyConfiguration { b.WithAPIVersion("wildwest.dev/v1alpha1") return b } +func (b CowboyApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -219,8 +220,24 @@ func (b *CowboyApplyConfiguration) WithStatus(value *CowboyStatusApplyConfigurat return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *CowboyApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *CowboyApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *CowboyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *CowboyApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/sheriff.go b/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/sheriff.go index af9a04d69c7..a75a7800520 100644 --- a/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/sheriff.go +++ b/test/e2e/fixtures/wildwest/client/applyconfiguration/wildwest/v1alpha1/sheriff.go @@ -43,6 +43,7 @@ func Sheriff(name string) *SheriffApplyConfiguration { b.WithAPIVersion("wildwest.dev/v1alpha1") return b } +func (b SheriffApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. @@ -218,8 +219,24 @@ func (b *SheriffApplyConfiguration) WithStatus(value *SheriffStatusApplyConfigur return b } +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *SheriffApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *SheriffApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + // GetName retrieves the value of the Name field in the declarative configuration. func (b *SheriffApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() return b.ObjectMetaApplyConfiguration.Name } + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *SheriffApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/test/e2e/fixtures/wildwest/client/clientset/versioned/fake/clientset_generated.go b/test/e2e/fixtures/wildwest/client/clientset/versioned/fake/clientset_generated.go index 46c5edbd8e3..c61ed9e5b85 100644 --- a/test/e2e/fixtures/wildwest/client/clientset/versioned/fake/clientset_generated.go +++ b/test/e2e/fixtures/wildwest/client/clientset/versioned/fake/clientset_generated.go @@ -106,8 +106,8 @@ func NewClientset(objects ...runtime.Object) *Clientset { cs.AddReactor("*", "*", testing.ObjectReaction(o)) cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) { var opts metav1.ListOptions - if watchActcion, ok := action.(testing.WatchActionImpl); ok { - opts = watchActcion.ListOptions + if watchAction, ok := action.(testing.WatchActionImpl); ok { + opts = watchAction.ListOptions } gvr := action.GetResource() ns := action.GetNamespace() diff --git a/test/e2e/garbagecollector/garbagecollector_test.go b/test/e2e/garbagecollector/garbagecollector_test.go index ba63f23ca8e..25ae83193e3 100644 --- a/test/e2e/garbagecollector/garbagecollector_test.go +++ b/test/e2e/garbagecollector/garbagecollector_test.go @@ -342,12 +342,17 @@ func TestGarbageCollectorNormalCRDs(t *testing.T) { require.NoError(t, err, "Error deleting all sheriffs in %s", ws) } - t.Logf("Waiting for the owned configmaps to be garbage collected") + t.Logf("Waiting for the owned configmaps in ws1 to be garbage collected") kcptestinghelpers.Eventually(t, func() (bool, string) { _, err1 := kubeClusterClient.Cluster(ws1Path).CoreV1().ConfigMaps("default").Get(ctx, "owned", metav1.GetOptions{}) + return apierrors.IsNotFound(err1), "configmaps not garbage collected" + }, wait.ForeverTestTimeout, 100*time.Millisecond, "error waiting for owned configmaps ws1 to be garbage collected") + + t.Logf("Waiting for the owned configmaps in ws2 to be garbage collected") + kcptestinghelpers.Eventually(t, func() (bool, string) { _, err2 := kubeClusterClient.Cluster(ws2Path).CoreV1().ConfigMaps("default").Get(ctx, "owned", metav1.GetOptions{}) - return apierrors.IsNotFound(err1) && apierrors.IsNotFound(err2), "configmaps not garbage collected" - }, wait.ForeverTestTimeout, 100*time.Millisecond, "error waiting for owned configmaps to be garbage collected") + return apierrors.IsNotFound(err2), "configmaps not garbage collected" + }, wait.ForeverTestTimeout, 100*time.Millisecond, "error waiting for owned configmaps ws2 to be garbage collected") } func TestGarbageCollectorVersionedCRDs(t *testing.T) { diff --git a/test/e2e/watchcache/watchcache_enabled_test.go b/test/e2e/watchcache/watchcache_enabled_test.go index 5da21334bb4..dbf528e2f3b 100644 --- a/test/e2e/watchcache/watchcache_enabled_test.go +++ b/test/e2e/watchcache/watchcache_enabled_test.go @@ -100,7 +100,7 @@ func TestWatchCacheEnabledForCRD(t *testing.T) { require.Equal(t, 1, len(res.Items), "expected to get exactly one cowboy") } - totalCacheHits, cowboysCacheHit := collectCacheHitsFor(ctx, t, server.RootShardSystemMasterBaseConfig(t), "/wildwest.dev/cowboys/customresources") + totalCacheHits, cowboysCacheHit := collectCacheHitsFor(ctx, t, server.RootShardSystemMasterBaseConfig(t), "wildwest.dev", "cowboys") if totalCacheHits == 0 { t.Fatalf("the watch cache is turned off, didn't find instances of %q metrics", "apiserver_cache_list_total") } @@ -152,7 +152,7 @@ func TestWatchCacheEnabledForAPIBindings(t *testing.T) { require.Equal(t, 1, len(res.Items), "expected to get exactly one sheriff") } - totalCacheHits, sheriffsCacheHit := collectCacheHitsFor(ctx, t, server.RootShardSystemMasterBaseConfig(t), "/newyork.io/sheriffs") + totalCacheHits, sheriffsCacheHit := collectCacheHitsFor(ctx, t, server.RootShardSystemMasterBaseConfig(t), "newyork.io", "sheriffs") if totalCacheHits == 0 { t.Fatalf("the watch cache is turned off, didn't find instances of %q metrics", "apiserver_cache_list_total") } @@ -212,7 +212,7 @@ func TestWatchCacheEnabledForBuiltinTypes(t *testing.T) { } } - totalCacheHits, secretsCacheHit := collectCacheHitsFor(ctx, t, server.RootShardSystemMasterBaseConfig(t), "/core/secrets") + totalCacheHits, secretsCacheHit := collectCacheHitsFor(ctx, t, server.RootShardSystemMasterBaseConfig(t), "", "secrets") if totalCacheHits == 0 { t.Fatalf("the watch cache is turned off, didn't find instances of %q metrics", "apiserver_cache_list_total") } @@ -221,13 +221,14 @@ func TestWatchCacheEnabledForBuiltinTypes(t *testing.T) { } } -func collectCacheHitsFor(ctx context.Context, t *testing.T, rootCfg *rest.Config, metricResourcePrefix string) (int, int) { +func collectCacheHitsFor(ctx context.Context, t *testing.T, rootCfg *rest.Config, group, resource string) (int, int) { t.Helper() rootShardKubeClusterClient, err := kcpkubernetesclientset.NewForConfig(rootCfg) require.NoError(t, err) - t.Logf("Reading %q metrics from the API server via %q endpoint for %q prefix", "apiserver_cache_list_total", "/metrics", metricResourcePrefix) + // metrics example: "apiserver_cache_list_total{group=\"\",index=\"\",resource=\"secrets\"} 118 + t.Logf("Reading %q metrics from the API server via %q endpoint for group %q and resource %q", "apiserver_cache_list_total", "/metrics", group, resource) rsp := rootShardKubeClusterClient.RESTClient().Get().AbsPath("/metrics").Do(ctx) raw, err := rsp.Raw() require.NoError(t, err) @@ -237,7 +238,8 @@ func collectCacheHitsFor(ctx context.Context, t *testing.T, rootCfg *rest.Config txt := scanner.Text() if strings.Contains(txt, "apiserver_cache_list_total") { totalCacheHits++ - if strings.Contains(txt, fmt.Sprintf(`resource_prefix="%v`, metricResourcePrefix)) { + if strings.Contains(txt, fmt.Sprintf(`group=%q`, group)) && + strings.Contains(txt, fmt.Sprintf(`resource=%q`, resource)) { re := regexp.MustCompile(`\b\d+\b`) prefixCacheHitInstance, err := strconv.Atoi(string(re.Find([]byte(txt)))) if err != nil {