This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/staging/src/k8s.io/apiextensions-apiserver/go.mod b/staging/src/k8s.io/apiextensions-apiserver/go.mod | |
index 9cbe376d16b..10ac25a61c5 100644 | |
--- a/staging/src/k8s.io/apiextensions-apiserver/go.mod | |
+++ b/staging/src/k8s.io/apiextensions-apiserver/go.mod | |
@@ -2,7 +2,7 @@ | |
module k8s.io/apiextensions-apiserver | |
-go 1.16 | |
+go 1.18 | |
require ( | |
github.com/emicklei/go-restful v2.9.5+incompatible | |
diff --git a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/kcp_rest_options_getter.go b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/kcp_rest_options_getter.go | |
index 814b481e88e..a27b5820c21 100644 | |
--- a/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/kcp_rest_options_getter.go | |
+++ b/staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/kcp_rest_options_getter.go | |
@@ -37,11 +37,11 @@ func (t apiBindingAwareCRDRESTOptionsGetter) GetRESTOptions(resource schema.Grou | |
// - /registry/mygroup.io/widgets/identity1234/... | |
// - /registry/mygroup.io/widgets/identity4567/... | |
if strings.HasSuffix(string(t.crd.UID), ".wildcard.partial-metadata") { | |
- ret.StorageConfig.KcpExtraStorageMetadata.Cluster = genericapirequest.Cluster{Name: logicalcluster.Wildcard, PartialMetadataRequest: true} | |
+ ret.StorageConfig.KcpExtraStorageMetadata.Cluster = genericapirequest.Cluster{Wildcard: true, PartialMetadataRequest: true} | |
return ret, nil | |
} | |
- ret.StorageConfig.KcpExtraStorageMetadata.Cluster = genericapirequest.Cluster{Name: logicalcluster.Wildcard} | |
+ ret.StorageConfig.KcpExtraStorageMetadata.Cluster = genericapirequest.Cluster{Wildcard: true} | |
// Normal CRDs (not coming from an APIBinding) are stored in e.g. /registry/mygroup.io/widgets/customresources/... | |
if _, bound := t.crd.Annotations["apis.kcp.dev/bound-crd"]; !bound { | |
ret.ResourcePrefix += "/customresources" | |
diff --git a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go | |
index a5180499872..929141e92b1 100644 | |
--- a/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go | |
+++ b/staging/src/k8s.io/apiserver/pkg/storage/cacher/cacher.go | |
@@ -24,8 +24,6 @@ import ( | |
"sync" | |
"time" | |
- "github.com/kcp-dev/logicalcluster/v3" | |
- | |
"k8s.io/apimachinery/pkg/api/errors" | |
"k8s.io/apimachinery/pkg/api/meta" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
@@ -384,7 +382,7 @@ func NewCacherFromConfig(config Config) (*Cacher, error) { | |
// empty storage metadata usually indicate build-in resources | |
// for those we require only a WildCard cluster to be present in the ctx | |
if config.KcpExtraStorageMetadata == nil { | |
- config.KcpExtraStorageMetadata = &storagebackend.KcpStorageMetadata{Cluster: genericapirequest.Cluster{Name: logicalcluster.Wildcard}} | |
+ config.KcpExtraStorageMetadata = &storagebackend.KcpStorageMetadata{Cluster: genericapirequest.Cluster{Wildcard: true}} | |
} | |
watchCache := newWatchCache( | |
diff --git a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_patch.go b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_patch.go | |
index 5b7a3836cf2..943f8c3caa5 100644 | |
--- a/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_patch.go | |
+++ b/staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_patch.go | |
@@ -33,7 +33,7 @@ import ( | |
// - CR partial metadata request: <prefix>/identity/clusterName/<remainder> | |
// - any other request: <prefix>/clusterName/<remainder>. | |
func adjustClusterNameIfWildcard(shard genericapirequest.Shard, cluster *genericapirequest.Cluster, crdRequest bool, keyPrefix, key string) logicalcluster.Name { | |
- if cluster.Name != logicalcluster.Wildcard && !cluster.Wildcard { // TODO: fix this duplicity, as well | |
+ if !cluster.Wildcard { // TODO: fix this duplicity, as well | |
return cluster.Name | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment