mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-20 09:33:52 +00:00
ingress: use networking api group for default storage of ingress
Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com> The change to registrytest was found by liggitt to mitigate a NPE error. This is necessary since ingress is a cohabitating resource that is not stored in the default version for the networking resource. Signed-off-by: Christopher M. Luciano <cmluciano@us.ibm.com>
This commit is contained in:
@@ -46,6 +46,7 @@ var SpecialDefaultResourcePrefixes = map[schema.GroupResource]string{
|
||||
{Group: "", Resource: "nodes"}: "minions",
|
||||
{Group: "", Resource: "services"}: "services/specs",
|
||||
{Group: "extensions", Resource: "ingresses"}: "ingress",
|
||||
{Group: "networking.k8s.io", Resource: "ingresses"}: "ingress",
|
||||
{Group: "extensions", Resource: "podsecuritypolicies"}: "podsecuritypolicy",
|
||||
{Group: "policy", Resource: "podsecuritypolicies"}: "podsecuritypolicy",
|
||||
}
|
||||
@@ -54,6 +55,7 @@ func NewStorageFactoryConfig() *StorageFactoryConfig {
|
||||
|
||||
resources := []schema.GroupVersionResource{
|
||||
batch.Resource("cronjobs").WithVersion("v1beta1"),
|
||||
networking.Resource("ingresses").WithVersion("v1beta1"),
|
||||
}
|
||||
// add csinodes if CSINodeInfo feature gate is enabled
|
||||
if utilfeature.DefaultFeatureGate.Enabled(features.CSINodeInfo) {
|
||||
@@ -110,7 +112,7 @@ func (c *completedStorageFactoryConfig) New() (*serverstorage.DefaultStorageFact
|
||||
storageFactory.AddCohabitatingResources(apps.Resource("replicasets"), extensions.Resource("replicasets"))
|
||||
storageFactory.AddCohabitatingResources(api.Resource("events"), events.Resource("events"))
|
||||
storageFactory.AddCohabitatingResources(policy.Resource("podsecuritypolicies"), extensions.Resource("podsecuritypolicies"))
|
||||
storageFactory.AddCohabitatingResources(extensions.Resource("ingresses"), networking.Resource("ingresses"))
|
||||
storageFactory.AddCohabitatingResources(networking.Resource("ingresses"), extensions.Resource("ingresses"))
|
||||
|
||||
for _, override := range c.EtcdServersOverrides {
|
||||
tokens := strings.Split(override, "#")
|
||||
|
Reference in New Issue
Block a user