api: resource.k8s.io v1alpha1 -> v1alpha2

For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.
This commit is contained in:
Patrick Ohly 2023-03-06 12:43:58 +01:00
parent 152876a3eb
commit 29941b8d3e
140 changed files with 2497 additions and 2497 deletions

File diff suppressed because it is too large Load Diff

View File

@ -8471,7 +8471,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -8859,7 +8859,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -9201,7 +9201,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -846,7 +846,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1229,7 +1229,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1571,7 +1571,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -972,7 +972,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1355,7 +1355,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1697,7 +1697,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1235,7 +1235,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1561,7 +1561,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1903,7 +1903,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -5464,7 +5464,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -5847,7 +5847,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -6189,7 +6189,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -601,7 +601,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -927,7 +927,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1269,7 +1269,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1254,7 +1254,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1637,7 +1637,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1979,7 +1979,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -4638,7 +4638,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -5021,7 +5021,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -5363,7 +5363,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -639,7 +639,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -965,7 +965,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1307,7 +1307,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -528,7 +528,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -859,7 +859,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1201,7 +1201,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -691,7 +691,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1017,7 +1017,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1359,7 +1359,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -650,7 +650,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -981,7 +981,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1323,7 +1323,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1111,7 +1111,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1437,7 +1437,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1779,7 +1779,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1115,7 +1115,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1441,7 +1441,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1783,7 +1783,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -618,7 +618,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -944,7 +944,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1286,7 +1286,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -1279,7 +1279,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1662,7 +1662,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -2004,7 +2004,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -606,7 +606,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -932,7 +932,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1274,7 +1274,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -591,7 +591,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -917,7 +917,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1259,7 +1259,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -654,7 +654,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1037,7 +1037,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1379,7 +1379,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -911,7 +911,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -1294,7 +1294,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1636,7 +1636,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -504,7 +504,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -830,7 +830,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1172,7 +1172,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -2343,7 +2343,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -2726,7 +2726,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -3068,7 +3068,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -530,7 +530,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "DeleteOptions", "kind": "DeleteOptions",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",
@ -913,7 +913,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "Status", "kind": "Status",
"version": "v1alpha1" "version": "v1alpha2"
} }
] ]
}, },
@ -1255,7 +1255,7 @@
{ {
"group": "resource.k8s.io", "group": "resource.k8s.io",
"kind": "WatchEvent", "kind": "WatchEvent",
"version": "v1alpha1" "version": "v1alpha2"
}, },
{ {
"group": "scheduling.k8s.io", "group": "scheduling.k8s.io",

View File

@ -284,7 +284,7 @@ var apiVersionPriorities = map[schema.GroupVersion]priority{
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {group: 16100, version: 12}, {Group: "flowcontrol.apiserver.k8s.io", Version: "v1beta1"}: {group: 16100, version: 12},
{Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16100, version: 9}, {Group: "flowcontrol.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16100, version: 9},
{Group: "internal.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16000, version: 9}, {Group: "internal.apiserver.k8s.io", Version: "v1alpha1"}: {group: 16000, version: 9},
{Group: "resource.k8s.io", Version: "v1alpha1"}: {group: 15900, version: 9}, {Group: "resource.k8s.io", Version: "v1alpha2"}: {group: 15900, version: 9},
// Append a new group to the end of the list if unsure. // Append a new group to the end of the list if unsure.
// You can use min(existing group)-100 as the initial value for a group. // You can use min(existing group)-100 as the initial value for a group.
// Version can be set to 9 (to have space around) for a new group. // Version can be set to 9 (to have space around) for a new group.

View File

@ -369,8 +369,8 @@ func startResourceClaimController(ctx context.Context, controllerContext Control
ephemeralController, err := resourceclaim.NewController( ephemeralController, err := resourceclaim.NewController(
controllerContext.ClientBuilder.ClientOrDie("resource-claim-controller"), controllerContext.ClientBuilder.ClientOrDie("resource-claim-controller"),
controllerContext.InformerFactory.Core().V1().Pods(), controllerContext.InformerFactory.Core().V1().Pods(),
controllerContext.InformerFactory.Resource().V1alpha1().ResourceClaims(), controllerContext.InformerFactory.Resource().V1alpha2().ResourceClaims(),
controllerContext.InformerFactory.Resource().V1alpha1().ResourceClaimTemplates()) controllerContext.InformerFactory.Resource().V1alpha2().ResourceClaimTemplates())
if err != nil { if err != nil {
return nil, true, fmt.Errorf("failed to start ephemeral volume controller: %v", err) return nil, true, fmt.Errorf("failed to start ephemeral volume controller: %v", err)
} }

View File

@ -92,7 +92,7 @@ coordination.k8s.io/v1beta1 \
coordination.k8s.io/v1 \ coordination.k8s.io/v1 \
discovery.k8s.io/v1 \ discovery.k8s.io/v1 \
discovery.k8s.io/v1beta1 \ discovery.k8s.io/v1beta1 \
resource.k8s.io/v1alpha1 \ resource.k8s.io/v1alpha2 \
extensions/v1beta1 \ extensions/v1beta1 \
events.k8s.io/v1 \ events.k8s.io/v1 \
events.k8s.io/v1beta1 \ events.k8s.io/v1beta1 \

View File

@ -137,10 +137,10 @@ func TestDefaulting(t *testing.T) {
{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBindingList"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "ClusterRoleBindingList"}: {},
{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBinding"}: {},
{Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBindingList"}: {}, {Group: "rbac.authorization.k8s.io", Version: "v1", Kind: "RoleBindingList"}: {},
{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaim"}: {}, {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaim"}: {},
{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaimList"}: {}, {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimList"}: {},
{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaimTemplate"}: {}, {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimTemplate"}: {},
{Group: "resource.k8s.io", Version: "v1alpha1", Kind: "ResourceClaimTemplateList"}: {}, {Group: "resource.k8s.io", Version: "v1alpha2", Kind: "ResourceClaimTemplateList"}: {},
{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicy"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicy"}: {},
{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyList"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyList"}: {},
{Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyBinding"}: {}, {Group: "admissionregistration.k8s.io", Version: "v1alpha1", Kind: "ValidatingAdmissionPolicyBinding"}: {},

View File

@ -23,7 +23,7 @@ import (
utilruntime "k8s.io/apimachinery/pkg/util/runtime" utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/kubernetes/pkg/api/legacyscheme" "k8s.io/kubernetes/pkg/api/legacyscheme"
"k8s.io/kubernetes/pkg/apis/resource" "k8s.io/kubernetes/pkg/apis/resource"
"k8s.io/kubernetes/pkg/apis/resource/v1alpha1" "k8s.io/kubernetes/pkg/apis/resource/v1alpha2"
) )
func init() { func init() {
@ -33,6 +33,6 @@ func init() {
// Install registers the API group and adds types to a scheme // Install registers the API group and adds types to a scheme
func Install(scheme *runtime.Scheme) { func Install(scheme *runtime.Scheme) {
utilruntime.Must(resource.AddToScheme(scheme)) utilruntime.Must(resource.AddToScheme(scheme))
utilruntime.Must(v1alpha1.AddToScheme(scheme)) utilruntime.Must(v1alpha2.AddToScheme(scheme))
utilruntime.Must(scheme.SetVersionPriority(v1alpha1.SchemeGroupVersion)) utilruntime.Must(scheme.SetVersionPriority(v1alpha2.SchemeGroupVersion))
} }

View File

@ -51,7 +51,7 @@ func TestResourceVersioner(t *testing.T) {
func TestCodec(t *testing.T) { func TestCodec(t *testing.T) {
claim := internal.ResourceClaim{} claim := internal.ResourceClaim{}
data, err := runtime.Encode(legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: "resource.k8s.io", Version: "v1alpha1"}), &claim) data, err := runtime.Encode(legacyscheme.Codecs.LegacyCodec(schema.GroupVersion{Group: "resource.k8s.io", Version: "v1alpha2"}), &claim)
if err != nil { if err != nil {
t.Fatalf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
} }
@ -59,7 +59,7 @@ func TestCodec(t *testing.T) {
if err := json.Unmarshal(data, &other); err != nil { if err := json.Unmarshal(data, &other); err != nil {
t.Fatalf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
} }
if other.APIVersion != "resource.k8s.io/v1alpha1" || other.Kind != "ResourceClaim" { if other.APIVersion != "resource.k8s.io/v1alpha2" || other.Kind != "ResourceClaim" {
t.Errorf("unexpected unmarshalled object %#v", other) t.Errorf("unexpected unmarshalled object %#v", other)
} }
} }

View File

@ -1,668 +0,0 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes 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 conversion-gen. DO NOT EDIT.
package v1alpha1
import (
unsafe "unsafe"
v1 "k8s.io/api/core/v1"
v1alpha1 "k8s.io/api/resource/v1alpha1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types"
core "k8s.io/kubernetes/pkg/apis/core"
resource "k8s.io/kubernetes/pkg/apis/resource"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1alpha1.AllocationResult)(nil), (*resource.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_AllocationResult_To_resource_AllocationResult(a.(*v1alpha1.AllocationResult), b.(*resource.AllocationResult), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.AllocationResult)(nil), (*v1alpha1.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_AllocationResult_To_v1alpha1_AllocationResult(a.(*resource.AllocationResult), b.(*v1alpha1.AllocationResult), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodScheduling)(nil), (*resource.PodScheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodScheduling_To_resource_PodScheduling(a.(*v1alpha1.PodScheduling), b.(*resource.PodScheduling), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodScheduling)(nil), (*v1alpha1.PodScheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodScheduling_To_v1alpha1_PodScheduling(a.(*resource.PodScheduling), b.(*v1alpha1.PodScheduling), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodSchedulingList)(nil), (*resource.PodSchedulingList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(a.(*v1alpha1.PodSchedulingList), b.(*resource.PodSchedulingList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingList)(nil), (*v1alpha1.PodSchedulingList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(a.(*resource.PodSchedulingList), b.(*v1alpha1.PodSchedulingList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodSchedulingSpec)(nil), (*resource.PodSchedulingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(a.(*v1alpha1.PodSchedulingSpec), b.(*resource.PodSchedulingSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingSpec)(nil), (*v1alpha1.PodSchedulingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(a.(*resource.PodSchedulingSpec), b.(*v1alpha1.PodSchedulingSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.PodSchedulingStatus)(nil), (*resource.PodSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(a.(*v1alpha1.PodSchedulingStatus), b.(*resource.PodSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingStatus)(nil), (*v1alpha1.PodSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(a.(*resource.PodSchedulingStatus), b.(*v1alpha1.PodSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaim)(nil), (*resource.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(a.(*v1alpha1.ResourceClaim), b.(*resource.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaim)(nil), (*v1alpha1.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(a.(*resource.ResourceClaim), b.(*v1alpha1.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimConsumerReference)(nil), (*resource.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(a.(*v1alpha1.ResourceClaimConsumerReference), b.(*resource.ResourceClaimConsumerReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimConsumerReference)(nil), (*v1alpha1.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(a.(*resource.ResourceClaimConsumerReference), b.(*v1alpha1.ResourceClaimConsumerReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimList)(nil), (*resource.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(a.(*v1alpha1.ResourceClaimList), b.(*resource.ResourceClaimList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimList)(nil), (*v1alpha1.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(a.(*resource.ResourceClaimList), b.(*v1alpha1.ResourceClaimList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimParametersReference)(nil), (*resource.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(a.(*v1alpha1.ResourceClaimParametersReference), b.(*resource.ResourceClaimParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersReference)(nil), (*v1alpha1.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(a.(*resource.ResourceClaimParametersReference), b.(*v1alpha1.ResourceClaimParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimSchedulingStatus)(nil), (*resource.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(a.(*v1alpha1.ResourceClaimSchedulingStatus), b.(*resource.ResourceClaimSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSchedulingStatus)(nil), (*v1alpha1.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(a.(*resource.ResourceClaimSchedulingStatus), b.(*v1alpha1.ResourceClaimSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimSpec)(nil), (*resource.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(a.(*v1alpha1.ResourceClaimSpec), b.(*resource.ResourceClaimSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSpec)(nil), (*v1alpha1.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(a.(*resource.ResourceClaimSpec), b.(*v1alpha1.ResourceClaimSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimStatus)(nil), (*resource.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(a.(*v1alpha1.ResourceClaimStatus), b.(*resource.ResourceClaimStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimStatus)(nil), (*v1alpha1.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(a.(*resource.ResourceClaimStatus), b.(*v1alpha1.ResourceClaimStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimTemplate)(nil), (*resource.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(a.(*v1alpha1.ResourceClaimTemplate), b.(*resource.ResourceClaimTemplate), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplate)(nil), (*v1alpha1.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(a.(*resource.ResourceClaimTemplate), b.(*v1alpha1.ResourceClaimTemplate), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimTemplateList)(nil), (*resource.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(a.(*v1alpha1.ResourceClaimTemplateList), b.(*resource.ResourceClaimTemplateList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateList)(nil), (*v1alpha1.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(a.(*resource.ResourceClaimTemplateList), b.(*v1alpha1.ResourceClaimTemplateList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClaimTemplateSpec)(nil), (*resource.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(a.(*v1alpha1.ResourceClaimTemplateSpec), b.(*resource.ResourceClaimTemplateSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateSpec)(nil), (*v1alpha1.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(a.(*resource.ResourceClaimTemplateSpec), b.(*v1alpha1.ResourceClaimTemplateSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClass)(nil), (*resource.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClass_To_resource_ResourceClass(a.(*v1alpha1.ResourceClass), b.(*resource.ResourceClass), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClass)(nil), (*v1alpha1.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClass_To_v1alpha1_ResourceClass(a.(*resource.ResourceClass), b.(*v1alpha1.ResourceClass), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClassList)(nil), (*resource.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(a.(*v1alpha1.ResourceClassList), b.(*resource.ResourceClassList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClassList)(nil), (*v1alpha1.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(a.(*resource.ResourceClassList), b.(*v1alpha1.ResourceClassList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.ResourceClassParametersReference)(nil), (*resource.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(a.(*v1alpha1.ResourceClassParametersReference), b.(*resource.ResourceClassParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersReference)(nil), (*v1alpha1.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(a.(*resource.ResourceClassParametersReference), b.(*v1alpha1.ResourceClassParametersReference), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_AllocationResult_To_resource_AllocationResult(in *v1alpha1.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
out.ResourceHandle = in.ResourceHandle
out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes))
out.Shareable = in.Shareable
return nil
}
// Convert_v1alpha1_AllocationResult_To_resource_AllocationResult is an autogenerated conversion function.
func Convert_v1alpha1_AllocationResult_To_resource_AllocationResult(in *v1alpha1.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
return autoConvert_v1alpha1_AllocationResult_To_resource_AllocationResult(in, out, s)
}
func autoConvert_resource_AllocationResult_To_v1alpha1_AllocationResult(in *resource.AllocationResult, out *v1alpha1.AllocationResult, s conversion.Scope) error {
out.ResourceHandle = in.ResourceHandle
out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes))
out.Shareable = in.Shareable
return nil
}
// Convert_resource_AllocationResult_To_v1alpha1_AllocationResult is an autogenerated conversion function.
func Convert_resource_AllocationResult_To_v1alpha1_AllocationResult(in *resource.AllocationResult, out *v1alpha1.AllocationResult, s conversion.Scope) error {
return autoConvert_resource_AllocationResult_To_v1alpha1_AllocationResult(in, out, s)
}
func autoConvert_v1alpha1_PodScheduling_To_resource_PodScheduling(in *v1alpha1.PodScheduling, out *resource.PodScheduling, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_PodScheduling_To_resource_PodScheduling is an autogenerated conversion function.
func Convert_v1alpha1_PodScheduling_To_resource_PodScheduling(in *v1alpha1.PodScheduling, out *resource.PodScheduling, s conversion.Scope) error {
return autoConvert_v1alpha1_PodScheduling_To_resource_PodScheduling(in, out, s)
}
func autoConvert_resource_PodScheduling_To_v1alpha1_PodScheduling(in *resource.PodScheduling, out *v1alpha1.PodScheduling, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_resource_PodScheduling_To_v1alpha1_PodScheduling is an autogenerated conversion function.
func Convert_resource_PodScheduling_To_v1alpha1_PodScheduling(in *resource.PodScheduling, out *v1alpha1.PodScheduling, s conversion.Scope) error {
return autoConvert_resource_PodScheduling_To_v1alpha1_PodScheduling(in, out, s)
}
func autoConvert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(in *v1alpha1.PodSchedulingList, out *resource.PodSchedulingList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.PodScheduling)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList is an autogenerated conversion function.
func Convert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(in *v1alpha1.PodSchedulingList, out *resource.PodSchedulingList, s conversion.Scope) error {
return autoConvert_v1alpha1_PodSchedulingList_To_resource_PodSchedulingList(in, out, s)
}
func autoConvert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(in *resource.PodSchedulingList, out *v1alpha1.PodSchedulingList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.PodScheduling)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList is an autogenerated conversion function.
func Convert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(in *resource.PodSchedulingList, out *v1alpha1.PodSchedulingList, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingList_To_v1alpha1_PodSchedulingList(in, out, s)
}
func autoConvert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(in *v1alpha1.PodSchedulingSpec, out *resource.PodSchedulingSpec, s conversion.Scope) error {
out.SelectedNode = in.SelectedNode
out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes))
return nil
}
// Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec is an autogenerated conversion function.
func Convert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(in *v1alpha1.PodSchedulingSpec, out *resource.PodSchedulingSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_PodSchedulingSpec_To_resource_PodSchedulingSpec(in, out, s)
}
func autoConvert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(in *resource.PodSchedulingSpec, out *v1alpha1.PodSchedulingSpec, s conversion.Scope) error {
out.SelectedNode = in.SelectedNode
out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes))
return nil
}
// Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec is an autogenerated conversion function.
func Convert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(in *resource.PodSchedulingSpec, out *v1alpha1.PodSchedulingSpec, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingSpec_To_v1alpha1_PodSchedulingSpec(in, out, s)
}
func autoConvert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(in *v1alpha1.PodSchedulingStatus, out *resource.PodSchedulingStatus, s conversion.Scope) error {
out.ResourceClaims = *(*[]resource.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims))
return nil
}
// Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus is an autogenerated conversion function.
func Convert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(in *v1alpha1.PodSchedulingStatus, out *resource.PodSchedulingStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_PodSchedulingStatus_To_resource_PodSchedulingStatus(in, out, s)
}
func autoConvert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(in *resource.PodSchedulingStatus, out *v1alpha1.PodSchedulingStatus, s conversion.Scope) error {
out.ResourceClaims = *(*[]v1alpha1.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims))
return nil
}
// Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus is an autogenerated conversion function.
func Convert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(in *resource.PodSchedulingStatus, out *v1alpha1.PodSchedulingStatus, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingStatus_To_v1alpha1_PodSchedulingStatus(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(in *v1alpha1.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_ResourceClaim_To_resource_ResourceClaim is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(in *v1alpha1.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaim_To_resource_ResourceClaim(in, out, s)
}
func autoConvert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(in *resource.ResourceClaim, out *v1alpha1.ResourceClaim, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaim_To_v1alpha1_ResourceClaim is an autogenerated conversion function.
func Convert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(in *resource.ResourceClaim, out *v1alpha1.ResourceClaim, s conversion.Scope) error {
return autoConvert_resource_ResourceClaim_To_v1alpha1_ResourceClaim(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha1.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Resource = in.Resource
out.Name = in.Name
out.UID = types.UID(in.UID)
return nil
}
// Convert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha1.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in, out, s)
}
func autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha1.ResourceClaimConsumerReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Resource = in.Resource
out.Name = in.Name
out.UID = types.UID(in.UID)
return nil
}
// Convert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference is an autogenerated conversion function.
func Convert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha1.ResourceClaimConsumerReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha1_ResourceClaimConsumerReference(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha1.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClaim)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha1.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimList_To_resource_ResourceClaimList(in, out, s)
}
func autoConvert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha1.ResourceClaimList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.ResourceClaim)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList is an autogenerated conversion function.
func Convert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha1.ResourceClaimList, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimList_To_v1alpha1_ResourceClaimList(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha1.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha1.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in, out, s)
}
func autoConvert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha1.ResourceClaimParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference is an autogenerated conversion function.
func Convert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha1.ResourceClaimParametersReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimParametersReference_To_v1alpha1_ResourceClaimParametersReference(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha1.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error {
out.Name = in.Name
out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes))
return nil
}
// Convert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha1.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in, out, s)
}
func autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha1.ResourceClaimSchedulingStatus, s conversion.Scope) error {
out.Name = in.Name
out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes))
return nil
}
// Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus is an autogenerated conversion function.
func Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha1.ResourceClaimSchedulingStatus, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha1_ResourceClaimSchedulingStatus(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha1.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error {
out.ResourceClassName = in.ResourceClassName
out.ParametersRef = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef))
out.AllocationMode = resource.AllocationMode(in.AllocationMode)
return nil
}
// Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha1.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(in, out, s)
}
func autoConvert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha1.ResourceClaimSpec, s conversion.Scope) error {
out.ResourceClassName = in.ResourceClassName
out.ParametersRef = (*v1alpha1.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef))
out.AllocationMode = v1alpha1.AllocationMode(in.AllocationMode)
return nil
}
// Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec is an autogenerated conversion function.
func Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha1.ResourceClaimSpec, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha1.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
out.DriverName = in.DriverName
out.Allocation = (*resource.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.DeallocationRequested = in.DeallocationRequested
return nil
}
// Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha1.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimStatus_To_resource_ResourceClaimStatus(in, out, s)
}
func autoConvert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha1.ResourceClaimStatus, s conversion.Scope) error {
out.DriverName = in.DriverName
out.Allocation = (*v1alpha1.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]v1alpha1.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.DeallocationRequested = in.DeallocationRequested
return nil
}
// Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus is an autogenerated conversion function.
func Convert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha1.ResourceClaimStatus, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimStatus_To_v1alpha1_ResourceClaimStatus(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha1.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha1.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha1.ResourceClaimTemplate, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha1.ResourceClaimTemplate, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplate_To_v1alpha1_ResourceClaimTemplate(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha1.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClaimTemplate)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha1.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha1.ResourceClaimTemplateList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.ResourceClaimTemplate)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha1.ResourceClaimTemplateList, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplateList_To_v1alpha1_ResourceClaimTemplateList(in, out, s)
}
func autoConvert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha1.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha1_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha1.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha1.ResourceClaimTemplateSpec, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimSpec_To_v1alpha1_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha1.ResourceClaimTemplateSpec, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha1_ResourceClaimTemplateSpec(in, out, s)
}
func autoConvert_v1alpha1_ResourceClass_To_resource_ResourceClass(in *v1alpha1.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.DriverName = in.DriverName
out.ParametersRef = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef))
out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes))
return nil
}
// Convert_v1alpha1_ResourceClass_To_resource_ResourceClass is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClass_To_resource_ResourceClass(in *v1alpha1.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClass_To_resource_ResourceClass(in, out, s)
}
func autoConvert_resource_ResourceClass_To_v1alpha1_ResourceClass(in *resource.ResourceClass, out *v1alpha1.ResourceClass, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.DriverName = in.DriverName
out.ParametersRef = (*v1alpha1.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef))
out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes))
return nil
}
// Convert_resource_ResourceClass_To_v1alpha1_ResourceClass is an autogenerated conversion function.
func Convert_resource_ResourceClass_To_v1alpha1_ResourceClass(in *resource.ResourceClass, out *v1alpha1.ResourceClass, s conversion.Scope) error {
return autoConvert_resource_ResourceClass_To_v1alpha1_ResourceClass(in, out, s)
}
func autoConvert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(in *v1alpha1.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClass)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha1_ResourceClassList_To_resource_ResourceClassList is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(in *v1alpha1.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClassList_To_resource_ResourceClassList(in, out, s)
}
func autoConvert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(in *resource.ResourceClassList, out *v1alpha1.ResourceClassList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha1.ResourceClass)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClassList_To_v1alpha1_ResourceClassList is an autogenerated conversion function.
func Convert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(in *resource.ResourceClassList, out *v1alpha1.ResourceClassList, s conversion.Scope) error {
return autoConvert_resource_ResourceClassList_To_v1alpha1_ResourceClassList(in, out, s)
}
func autoConvert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha1.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
out.Namespace = in.Namespace
return nil
}
// Convert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference is an autogenerated conversion function.
func Convert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha1.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error {
return autoConvert_v1alpha1_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in, out, s)
}
func autoConvert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha1.ResourceClassParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
out.Namespace = in.Namespace
return nil
}
// Convert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference is an autogenerated conversion function.
func Convert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha1.ResourceClassParametersReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClassParametersReference_To_v1alpha1_ResourceClassParametersReference(in, out, s)
}

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha1 package v1alpha2
import ( import (
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"

View File

@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha1 package v1alpha2
import ( import (
"k8s.io/api/resource/v1alpha1" "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
) )
@ -25,8 +25,8 @@ func addDefaultingFuncs(scheme *runtime.Scheme) error {
return RegisterDefaults(scheme) return RegisterDefaults(scheme)
} }
func SetDefaults_ResourceClaimSpec(obj *v1alpha1.ResourceClaimSpec) { func SetDefaults_ResourceClaimSpec(obj *v1alpha2.ResourceClaimSpec) {
if obj.AllocationMode == "" { if obj.AllocationMode == "" {
obj.AllocationMode = v1alpha1.AllocationModeWaitForFirstConsumer obj.AllocationMode = v1alpha2.AllocationModeWaitForFirstConsumer
} }
} }

View File

@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha1_test package v1alpha2_test
import ( import (
"reflect" "reflect"
"testing" "testing"
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
// ensure types are installed // ensure types are installed
@ -29,32 +29,32 @@ import (
) )
func TestSetDefaultAllocationMode(t *testing.T) { func TestSetDefaultAllocationMode(t *testing.T) {
claim := &v1alpha1.ResourceClaim{} claim := &v1alpha2.ResourceClaim{}
// field should be defaulted // field should be defaulted
defaultMode := v1alpha1.AllocationModeWaitForFirstConsumer defaultMode := v1alpha2.AllocationModeWaitForFirstConsumer
output := roundTrip(t, runtime.Object(claim)).(*v1alpha1.ResourceClaim) output := roundTrip(t, runtime.Object(claim)).(*v1alpha2.ResourceClaim)
outMode := output.Spec.AllocationMode outMode := output.Spec.AllocationMode
if outMode != defaultMode { if outMode != defaultMode {
t.Errorf("Expected AllocationMode to be defaulted to: %+v, got: %+v", defaultMode, outMode) t.Errorf("Expected AllocationMode to be defaulted to: %+v, got: %+v", defaultMode, outMode)
} }
// field should not change // field should not change
nonDefaultMode := v1alpha1.AllocationModeImmediate nonDefaultMode := v1alpha2.AllocationModeImmediate
claim = &v1alpha1.ResourceClaim{ claim = &v1alpha2.ResourceClaim{
Spec: v1alpha1.ResourceClaimSpec{ Spec: v1alpha2.ResourceClaimSpec{
AllocationMode: nonDefaultMode, AllocationMode: nonDefaultMode,
}, },
} }
output = roundTrip(t, runtime.Object(claim)).(*v1alpha1.ResourceClaim) output = roundTrip(t, runtime.Object(claim)).(*v1alpha2.ResourceClaim)
outMode = output.Spec.AllocationMode outMode = output.Spec.AllocationMode
if outMode != v1alpha1.AllocationModeImmediate { if outMode != v1alpha2.AllocationModeImmediate {
t.Errorf("Expected AllocationMode to remain %+v, got: %+v", nonDefaultMode, outMode) t.Errorf("Expected AllocationMode to remain %+v, got: %+v", nonDefaultMode, outMode)
} }
} }
func roundTrip(t *testing.T, obj runtime.Object) runtime.Object { func roundTrip(t *testing.T, obj runtime.Object) runtime.Object {
codec := legacyscheme.Codecs.LegacyCodec(v1alpha1.SchemeGroupVersion) codec := legacyscheme.Codecs.LegacyCodec(v1alpha2.SchemeGroupVersion)
data, err := runtime.Encode(codec, obj) data, err := runtime.Encode(codec, obj)
if err != nil { if err != nil {
t.Errorf("%v\n %#v", err, obj) t.Errorf("%v\n %#v", err, obj)

View File

@ -15,9 +15,9 @@ limitations under the License.
*/ */
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/resource // +k8s:conversion-gen=k8s.io/kubernetes/pkg/apis/resource
// +k8s:conversion-gen-external-types=k8s.io/api/resource/v1alpha1 // +k8s:conversion-gen-external-types=k8s.io/api/resource/v1alpha2
// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=k8s.io/api/resource/v1alpha1 // +k8s:defaulter-gen-input=k8s.io/api/resource/v1alpha2
// Package v1alpha1 is the v1alpha1 version of the resource API. // Package v1alpha2 is the v1alpha2 version of the resource API.
package v1alpha1 // import "k8s.io/kubernetes/pkg/apis/resource/v1alpha1" package v1alpha2 // import "k8s.io/kubernetes/pkg/apis/resource/v1alpha2"

View File

@ -14,15 +14,15 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha1 package v1alpha2
import ( import (
"k8s.io/api/resource/v1alpha1" "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
) )
var ( var (
localSchemeBuilder = &v1alpha1.SchemeBuilder localSchemeBuilder = &v1alpha2.SchemeBuilder
AddToScheme = localSchemeBuilder.AddToScheme AddToScheme = localSchemeBuilder.AddToScheme
) )
@ -38,7 +38,7 @@ func init() {
const GroupName = "resource.k8s.io" const GroupName = "resource.k8s.io"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource // Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource { func Resource(resource string) schema.GroupResource {

View File

@ -0,0 +1,668 @@
//go:build !ignore_autogenerated
// +build !ignore_autogenerated
/*
Copyright The Kubernetes 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 conversion-gen. DO NOT EDIT.
package v1alpha2
import (
unsafe "unsafe"
v1 "k8s.io/api/core/v1"
v1alpha2 "k8s.io/api/resource/v1alpha2"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types"
core "k8s.io/kubernetes/pkg/apis/core"
resource "k8s.io/kubernetes/pkg/apis/resource"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1alpha2.AllocationResult)(nil), (*resource.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_AllocationResult_To_resource_AllocationResult(a.(*v1alpha2.AllocationResult), b.(*resource.AllocationResult), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.AllocationResult)(nil), (*v1alpha2.AllocationResult)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_AllocationResult_To_v1alpha2_AllocationResult(a.(*resource.AllocationResult), b.(*v1alpha2.AllocationResult), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.PodScheduling)(nil), (*resource.PodScheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_PodScheduling_To_resource_PodScheduling(a.(*v1alpha2.PodScheduling), b.(*resource.PodScheduling), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodScheduling)(nil), (*v1alpha2.PodScheduling)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodScheduling_To_v1alpha2_PodScheduling(a.(*resource.PodScheduling), b.(*v1alpha2.PodScheduling), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingList)(nil), (*resource.PodSchedulingList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_PodSchedulingList_To_resource_PodSchedulingList(a.(*v1alpha2.PodSchedulingList), b.(*resource.PodSchedulingList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingList)(nil), (*v1alpha2.PodSchedulingList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingList_To_v1alpha2_PodSchedulingList(a.(*resource.PodSchedulingList), b.(*v1alpha2.PodSchedulingList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingSpec)(nil), (*resource.PodSchedulingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_PodSchedulingSpec_To_resource_PodSchedulingSpec(a.(*v1alpha2.PodSchedulingSpec), b.(*resource.PodSchedulingSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingSpec)(nil), (*v1alpha2.PodSchedulingSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingSpec_To_v1alpha2_PodSchedulingSpec(a.(*resource.PodSchedulingSpec), b.(*v1alpha2.PodSchedulingSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.PodSchedulingStatus)(nil), (*resource.PodSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_PodSchedulingStatus_To_resource_PodSchedulingStatus(a.(*v1alpha2.PodSchedulingStatus), b.(*resource.PodSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.PodSchedulingStatus)(nil), (*v1alpha2.PodSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_PodSchedulingStatus_To_v1alpha2_PodSchedulingStatus(a.(*resource.PodSchedulingStatus), b.(*v1alpha2.PodSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaim)(nil), (*resource.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(a.(*v1alpha2.ResourceClaim), b.(*resource.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaim)(nil), (*v1alpha2.ResourceClaim)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(a.(*resource.ResourceClaim), b.(*v1alpha2.ResourceClaim), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimConsumerReference)(nil), (*resource.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(a.(*v1alpha2.ResourceClaimConsumerReference), b.(*resource.ResourceClaimConsumerReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimConsumerReference)(nil), (*v1alpha2.ResourceClaimConsumerReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(a.(*resource.ResourceClaimConsumerReference), b.(*v1alpha2.ResourceClaimConsumerReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimList)(nil), (*resource.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(a.(*v1alpha2.ResourceClaimList), b.(*resource.ResourceClaimList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimList)(nil), (*v1alpha2.ResourceClaimList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(a.(*resource.ResourceClaimList), b.(*v1alpha2.ResourceClaimList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimParametersReference)(nil), (*resource.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(a.(*v1alpha2.ResourceClaimParametersReference), b.(*resource.ResourceClaimParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimParametersReference)(nil), (*v1alpha2.ResourceClaimParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(a.(*resource.ResourceClaimParametersReference), b.(*v1alpha2.ResourceClaimParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimSchedulingStatus)(nil), (*resource.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(a.(*v1alpha2.ResourceClaimSchedulingStatus), b.(*resource.ResourceClaimSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSchedulingStatus)(nil), (*v1alpha2.ResourceClaimSchedulingStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(a.(*resource.ResourceClaimSchedulingStatus), b.(*v1alpha2.ResourceClaimSchedulingStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimSpec)(nil), (*resource.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(a.(*v1alpha2.ResourceClaimSpec), b.(*resource.ResourceClaimSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimSpec)(nil), (*v1alpha2.ResourceClaimSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(a.(*resource.ResourceClaimSpec), b.(*v1alpha2.ResourceClaimSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimStatus)(nil), (*resource.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(a.(*v1alpha2.ResourceClaimStatus), b.(*resource.ResourceClaimStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimStatus)(nil), (*v1alpha2.ResourceClaimStatus)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(a.(*resource.ResourceClaimStatus), b.(*v1alpha2.ResourceClaimStatus), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimTemplate)(nil), (*resource.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(a.(*v1alpha2.ResourceClaimTemplate), b.(*resource.ResourceClaimTemplate), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplate)(nil), (*v1alpha2.ResourceClaimTemplate)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(a.(*resource.ResourceClaimTemplate), b.(*v1alpha2.ResourceClaimTemplate), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimTemplateList)(nil), (*resource.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(a.(*v1alpha2.ResourceClaimTemplateList), b.(*resource.ResourceClaimTemplateList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateList)(nil), (*v1alpha2.ResourceClaimTemplateList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(a.(*resource.ResourceClaimTemplateList), b.(*v1alpha2.ResourceClaimTemplateList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClaimTemplateSpec)(nil), (*resource.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(a.(*v1alpha2.ResourceClaimTemplateSpec), b.(*resource.ResourceClaimTemplateSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClaimTemplateSpec)(nil), (*v1alpha2.ResourceClaimTemplateSpec)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(a.(*resource.ResourceClaimTemplateSpec), b.(*v1alpha2.ResourceClaimTemplateSpec), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClass)(nil), (*resource.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClass_To_resource_ResourceClass(a.(*v1alpha2.ResourceClass), b.(*resource.ResourceClass), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClass)(nil), (*v1alpha2.ResourceClass)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClass_To_v1alpha2_ResourceClass(a.(*resource.ResourceClass), b.(*v1alpha2.ResourceClass), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassList)(nil), (*resource.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(a.(*v1alpha2.ResourceClassList), b.(*resource.ResourceClassList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClassList)(nil), (*v1alpha2.ResourceClassList)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(a.(*resource.ResourceClassList), b.(*v1alpha2.ResourceClassList), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha2.ResourceClassParametersReference)(nil), (*resource.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(a.(*v1alpha2.ResourceClassParametersReference), b.(*resource.ResourceClassParametersReference), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*resource.ResourceClassParametersReference)(nil), (*v1alpha2.ResourceClassParametersReference)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(a.(*resource.ResourceClassParametersReference), b.(*v1alpha2.ResourceClassParametersReference), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha2_AllocationResult_To_resource_AllocationResult(in *v1alpha2.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
out.ResourceHandle = in.ResourceHandle
out.AvailableOnNodes = (*core.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes))
out.Shareable = in.Shareable
return nil
}
// Convert_v1alpha2_AllocationResult_To_resource_AllocationResult is an autogenerated conversion function.
func Convert_v1alpha2_AllocationResult_To_resource_AllocationResult(in *v1alpha2.AllocationResult, out *resource.AllocationResult, s conversion.Scope) error {
return autoConvert_v1alpha2_AllocationResult_To_resource_AllocationResult(in, out, s)
}
func autoConvert_resource_AllocationResult_To_v1alpha2_AllocationResult(in *resource.AllocationResult, out *v1alpha2.AllocationResult, s conversion.Scope) error {
out.ResourceHandle = in.ResourceHandle
out.AvailableOnNodes = (*v1.NodeSelector)(unsafe.Pointer(in.AvailableOnNodes))
out.Shareable = in.Shareable
return nil
}
// Convert_resource_AllocationResult_To_v1alpha2_AllocationResult is an autogenerated conversion function.
func Convert_resource_AllocationResult_To_v1alpha2_AllocationResult(in *resource.AllocationResult, out *v1alpha2.AllocationResult, s conversion.Scope) error {
return autoConvert_resource_AllocationResult_To_v1alpha2_AllocationResult(in, out, s)
}
func autoConvert_v1alpha2_PodScheduling_To_resource_PodScheduling(in *v1alpha2.PodScheduling, out *resource.PodScheduling, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha2_PodSchedulingSpec_To_resource_PodSchedulingSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha2_PodSchedulingStatus_To_resource_PodSchedulingStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha2_PodScheduling_To_resource_PodScheduling is an autogenerated conversion function.
func Convert_v1alpha2_PodScheduling_To_resource_PodScheduling(in *v1alpha2.PodScheduling, out *resource.PodScheduling, s conversion.Scope) error {
return autoConvert_v1alpha2_PodScheduling_To_resource_PodScheduling(in, out, s)
}
func autoConvert_resource_PodScheduling_To_v1alpha2_PodScheduling(in *resource.PodScheduling, out *v1alpha2.PodScheduling, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_PodSchedulingSpec_To_v1alpha2_PodSchedulingSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_resource_PodSchedulingStatus_To_v1alpha2_PodSchedulingStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_resource_PodScheduling_To_v1alpha2_PodScheduling is an autogenerated conversion function.
func Convert_resource_PodScheduling_To_v1alpha2_PodScheduling(in *resource.PodScheduling, out *v1alpha2.PodScheduling, s conversion.Scope) error {
return autoConvert_resource_PodScheduling_To_v1alpha2_PodScheduling(in, out, s)
}
func autoConvert_v1alpha2_PodSchedulingList_To_resource_PodSchedulingList(in *v1alpha2.PodSchedulingList, out *resource.PodSchedulingList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.PodScheduling)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha2_PodSchedulingList_To_resource_PodSchedulingList is an autogenerated conversion function.
func Convert_v1alpha2_PodSchedulingList_To_resource_PodSchedulingList(in *v1alpha2.PodSchedulingList, out *resource.PodSchedulingList, s conversion.Scope) error {
return autoConvert_v1alpha2_PodSchedulingList_To_resource_PodSchedulingList(in, out, s)
}
func autoConvert_resource_PodSchedulingList_To_v1alpha2_PodSchedulingList(in *resource.PodSchedulingList, out *v1alpha2.PodSchedulingList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha2.PodScheduling)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_PodSchedulingList_To_v1alpha2_PodSchedulingList is an autogenerated conversion function.
func Convert_resource_PodSchedulingList_To_v1alpha2_PodSchedulingList(in *resource.PodSchedulingList, out *v1alpha2.PodSchedulingList, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingList_To_v1alpha2_PodSchedulingList(in, out, s)
}
func autoConvert_v1alpha2_PodSchedulingSpec_To_resource_PodSchedulingSpec(in *v1alpha2.PodSchedulingSpec, out *resource.PodSchedulingSpec, s conversion.Scope) error {
out.SelectedNode = in.SelectedNode
out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes))
return nil
}
// Convert_v1alpha2_PodSchedulingSpec_To_resource_PodSchedulingSpec is an autogenerated conversion function.
func Convert_v1alpha2_PodSchedulingSpec_To_resource_PodSchedulingSpec(in *v1alpha2.PodSchedulingSpec, out *resource.PodSchedulingSpec, s conversion.Scope) error {
return autoConvert_v1alpha2_PodSchedulingSpec_To_resource_PodSchedulingSpec(in, out, s)
}
func autoConvert_resource_PodSchedulingSpec_To_v1alpha2_PodSchedulingSpec(in *resource.PodSchedulingSpec, out *v1alpha2.PodSchedulingSpec, s conversion.Scope) error {
out.SelectedNode = in.SelectedNode
out.PotentialNodes = *(*[]string)(unsafe.Pointer(&in.PotentialNodes))
return nil
}
// Convert_resource_PodSchedulingSpec_To_v1alpha2_PodSchedulingSpec is an autogenerated conversion function.
func Convert_resource_PodSchedulingSpec_To_v1alpha2_PodSchedulingSpec(in *resource.PodSchedulingSpec, out *v1alpha2.PodSchedulingSpec, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingSpec_To_v1alpha2_PodSchedulingSpec(in, out, s)
}
func autoConvert_v1alpha2_PodSchedulingStatus_To_resource_PodSchedulingStatus(in *v1alpha2.PodSchedulingStatus, out *resource.PodSchedulingStatus, s conversion.Scope) error {
out.ResourceClaims = *(*[]resource.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims))
return nil
}
// Convert_v1alpha2_PodSchedulingStatus_To_resource_PodSchedulingStatus is an autogenerated conversion function.
func Convert_v1alpha2_PodSchedulingStatus_To_resource_PodSchedulingStatus(in *v1alpha2.PodSchedulingStatus, out *resource.PodSchedulingStatus, s conversion.Scope) error {
return autoConvert_v1alpha2_PodSchedulingStatus_To_resource_PodSchedulingStatus(in, out, s)
}
func autoConvert_resource_PodSchedulingStatus_To_v1alpha2_PodSchedulingStatus(in *resource.PodSchedulingStatus, out *v1alpha2.PodSchedulingStatus, s conversion.Scope) error {
out.ResourceClaims = *(*[]v1alpha2.ResourceClaimSchedulingStatus)(unsafe.Pointer(&in.ResourceClaims))
return nil
}
// Convert_resource_PodSchedulingStatus_To_v1alpha2_PodSchedulingStatus is an autogenerated conversion function.
func Convert_resource_PodSchedulingStatus_To_v1alpha2_PodSchedulingStatus(in *resource.PodSchedulingStatus, out *v1alpha2.PodSchedulingStatus, s conversion.Scope) error {
return autoConvert_resource_PodSchedulingStatus_To_v1alpha2_PodSchedulingStatus(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(in *v1alpha2.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(in *v1alpha2.ResourceClaim, out *resource.ResourceClaim, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaim_To_resource_ResourceClaim(in, out, s)
}
func autoConvert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(in *resource.ResourceClaim, out *v1alpha2.ResourceClaim, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
if err := Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(&in.Status, &out.Status, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim is an autogenerated conversion function.
func Convert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(in *resource.ResourceClaim, out *v1alpha2.ResourceClaim, s conversion.Scope) error {
return autoConvert_resource_ResourceClaim_To_v1alpha2_ResourceClaim(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha2.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Resource = in.Resource
out.Name = in.Name
out.UID = types.UID(in.UID)
return nil
}
// Convert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in *v1alpha2.ResourceClaimConsumerReference, out *resource.ResourceClaimConsumerReference, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimConsumerReference_To_resource_ResourceClaimConsumerReference(in, out, s)
}
func autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha2.ResourceClaimConsumerReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Resource = in.Resource
out.Name = in.Name
out.UID = types.UID(in.UID)
return nil
}
// Convert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference is an autogenerated conversion function.
func Convert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(in *resource.ResourceClaimConsumerReference, out *v1alpha2.ResourceClaimConsumerReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimConsumerReference_To_v1alpha2_ResourceClaimConsumerReference(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha2.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClaim)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in *v1alpha2.ResourceClaimList, out *resource.ResourceClaimList, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimList_To_resource_ResourceClaimList(in, out, s)
}
func autoConvert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha2.ResourceClaimList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha2.ResourceClaim)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList is an autogenerated conversion function.
func Convert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in *resource.ResourceClaimList, out *v1alpha2.ResourceClaimList, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimList_To_v1alpha2_ResourceClaimList(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha2.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in *v1alpha2.ResourceClaimParametersReference, out *resource.ResourceClaimParametersReference, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimParametersReference_To_resource_ResourceClaimParametersReference(in, out, s)
}
func autoConvert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha2.ResourceClaimParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
return nil
}
// Convert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference is an autogenerated conversion function.
func Convert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(in *resource.ResourceClaimParametersReference, out *v1alpha2.ResourceClaimParametersReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimParametersReference_To_v1alpha2_ResourceClaimParametersReference(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha2.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error {
out.Name = in.Name
out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes))
return nil
}
// Convert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in *v1alpha2.ResourceClaimSchedulingStatus, out *resource.ResourceClaimSchedulingStatus, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimSchedulingStatus_To_resource_ResourceClaimSchedulingStatus(in, out, s)
}
func autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha2.ResourceClaimSchedulingStatus, s conversion.Scope) error {
out.Name = in.Name
out.UnsuitableNodes = *(*[]string)(unsafe.Pointer(&in.UnsuitableNodes))
return nil
}
// Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus is an autogenerated conversion function.
func Convert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(in *resource.ResourceClaimSchedulingStatus, out *v1alpha2.ResourceClaimSchedulingStatus, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimSchedulingStatus_To_v1alpha2_ResourceClaimSchedulingStatus(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha2.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error {
out.ResourceClassName = in.ResourceClassName
out.ParametersRef = (*resource.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef))
out.AllocationMode = resource.AllocationMode(in.AllocationMode)
return nil
}
// Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in *v1alpha2.ResourceClaimSpec, out *resource.ResourceClaimSpec, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(in, out, s)
}
func autoConvert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha2.ResourceClaimSpec, s conversion.Scope) error {
out.ResourceClassName = in.ResourceClassName
out.ParametersRef = (*v1alpha2.ResourceClaimParametersReference)(unsafe.Pointer(in.ParametersRef))
out.AllocationMode = v1alpha2.AllocationMode(in.AllocationMode)
return nil
}
// Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec is an autogenerated conversion function.
func Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in *resource.ResourceClaimSpec, out *v1alpha2.ResourceClaimSpec, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha2.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
out.DriverName = in.DriverName
out.Allocation = (*resource.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]resource.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.DeallocationRequested = in.DeallocationRequested
return nil
}
// Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in *v1alpha2.ResourceClaimStatus, out *resource.ResourceClaimStatus, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimStatus_To_resource_ResourceClaimStatus(in, out, s)
}
func autoConvert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha2.ResourceClaimStatus, s conversion.Scope) error {
out.DriverName = in.DriverName
out.Allocation = (*v1alpha2.AllocationResult)(unsafe.Pointer(in.Allocation))
out.ReservedFor = *(*[]v1alpha2.ResourceClaimConsumerReference)(unsafe.Pointer(&in.ReservedFor))
out.DeallocationRequested = in.DeallocationRequested
return nil
}
// Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus is an autogenerated conversion function.
func Convert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(in *resource.ResourceClaimStatus, out *v1alpha2.ResourceClaimStatus, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimStatus_To_v1alpha2_ResourceClaimStatus(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha2.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in *v1alpha2.ResourceClaimTemplate, out *resource.ResourceClaimTemplate, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimTemplate_To_resource_ResourceClaimTemplate(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha2.ResourceClaimTemplate, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(in *resource.ResourceClaimTemplate, out *v1alpha2.ResourceClaimTemplate, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplate_To_v1alpha2_ResourceClaimTemplate(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha2.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClaimTemplate)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in *v1alpha2.ResourceClaimTemplateList, out *resource.ResourceClaimTemplateList, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimTemplateList_To_resource_ResourceClaimTemplateList(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha2.ResourceClaimTemplateList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha2.ResourceClaimTemplate)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(in *resource.ResourceClaimTemplateList, out *v1alpha2.ResourceClaimTemplateList, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplateList_To_v1alpha2_ResourceClaimTemplateList(in, out, s)
}
func autoConvert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha2.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_v1alpha2_ResourceClaimSpec_To_resource_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in *v1alpha2.ResourceClaimTemplateSpec, out *resource.ResourceClaimTemplateSpec, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClaimTemplateSpec_To_resource_ResourceClaimTemplateSpec(in, out, s)
}
func autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha2.ResourceClaimTemplateSpec, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
if err := Convert_resource_ResourceClaimSpec_To_v1alpha2_ResourceClaimSpec(&in.Spec, &out.Spec, s); err != nil {
return err
}
return nil
}
// Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec is an autogenerated conversion function.
func Convert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(in *resource.ResourceClaimTemplateSpec, out *v1alpha2.ResourceClaimTemplateSpec, s conversion.Scope) error {
return autoConvert_resource_ResourceClaimTemplateSpec_To_v1alpha2_ResourceClaimTemplateSpec(in, out, s)
}
func autoConvert_v1alpha2_ResourceClass_To_resource_ResourceClass(in *v1alpha2.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.DriverName = in.DriverName
out.ParametersRef = (*resource.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef))
out.SuitableNodes = (*core.NodeSelector)(unsafe.Pointer(in.SuitableNodes))
return nil
}
// Convert_v1alpha2_ResourceClass_To_resource_ResourceClass is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClass_To_resource_ResourceClass(in *v1alpha2.ResourceClass, out *resource.ResourceClass, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClass_To_resource_ResourceClass(in, out, s)
}
func autoConvert_resource_ResourceClass_To_v1alpha2_ResourceClass(in *resource.ResourceClass, out *v1alpha2.ResourceClass, s conversion.Scope) error {
out.ObjectMeta = in.ObjectMeta
out.DriverName = in.DriverName
out.ParametersRef = (*v1alpha2.ResourceClassParametersReference)(unsafe.Pointer(in.ParametersRef))
out.SuitableNodes = (*v1.NodeSelector)(unsafe.Pointer(in.SuitableNodes))
return nil
}
// Convert_resource_ResourceClass_To_v1alpha2_ResourceClass is an autogenerated conversion function.
func Convert_resource_ResourceClass_To_v1alpha2_ResourceClass(in *resource.ResourceClass, out *v1alpha2.ResourceClass, s conversion.Scope) error {
return autoConvert_resource_ResourceClass_To_v1alpha2_ResourceClass(in, out, s)
}
func autoConvert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(in *v1alpha2.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]resource.ResourceClass)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_v1alpha2_ResourceClassList_To_resource_ResourceClassList is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(in *v1alpha2.ResourceClassList, out *resource.ResourceClassList, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClassList_To_resource_ResourceClassList(in, out, s)
}
func autoConvert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in *resource.ResourceClassList, out *v1alpha2.ResourceClassList, s conversion.Scope) error {
out.ListMeta = in.ListMeta
out.Items = *(*[]v1alpha2.ResourceClass)(unsafe.Pointer(&in.Items))
return nil
}
// Convert_resource_ResourceClassList_To_v1alpha2_ResourceClassList is an autogenerated conversion function.
func Convert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in *resource.ResourceClassList, out *v1alpha2.ResourceClassList, s conversion.Scope) error {
return autoConvert_resource_ResourceClassList_To_v1alpha2_ResourceClassList(in, out, s)
}
func autoConvert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha2.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
out.Namespace = in.Namespace
return nil
}
// Convert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference is an autogenerated conversion function.
func Convert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in *v1alpha2.ResourceClassParametersReference, out *resource.ResourceClassParametersReference, s conversion.Scope) error {
return autoConvert_v1alpha2_ResourceClassParametersReference_To_resource_ResourceClassParametersReference(in, out, s)
}
func autoConvert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha2.ResourceClassParametersReference, s conversion.Scope) error {
out.APIGroup = in.APIGroup
out.Kind = in.Kind
out.Name = in.Name
out.Namespace = in.Namespace
return nil
}
// Convert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference is an autogenerated conversion function.
func Convert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(in *resource.ResourceClassParametersReference, out *v1alpha2.ResourceClassParametersReference, s conversion.Scope) error {
return autoConvert_resource_ResourceClassParametersReference_To_v1alpha2_ResourceClassParametersReference(in, out, s)
}

View File

@ -19,10 +19,10 @@ limitations under the License.
// Code generated by defaulter-gen. DO NOT EDIT. // Code generated by defaulter-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
) )
@ -30,31 +30,31 @@ import (
// Public to allow building arbitrary schemes. // Public to allow building arbitrary schemes.
// All generated defaulters are covering - they call all nested defaulters. // All generated defaulters are covering - they call all nested defaulters.
func RegisterDefaults(scheme *runtime.Scheme) error { func RegisterDefaults(scheme *runtime.Scheme) error {
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*v1alpha1.ResourceClaim)) }) scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaim{}, func(obj interface{}) { SetObjectDefaults_ResourceClaim(obj.(*v1alpha2.ResourceClaim)) })
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*v1alpha1.ResourceClaimList)) }) scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimList{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimList(obj.(*v1alpha2.ResourceClaimList)) })
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaimTemplate{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimTemplate(obj.(*v1alpha1.ResourceClaimTemplate)) }) scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimTemplate{}, func(obj interface{}) { SetObjectDefaults_ResourceClaimTemplate(obj.(*v1alpha2.ResourceClaimTemplate)) })
scheme.AddTypeDefaultingFunc(&v1alpha1.ResourceClaimTemplateList{}, func(obj interface{}) { scheme.AddTypeDefaultingFunc(&v1alpha2.ResourceClaimTemplateList{}, func(obj interface{}) {
SetObjectDefaults_ResourceClaimTemplateList(obj.(*v1alpha1.ResourceClaimTemplateList)) SetObjectDefaults_ResourceClaimTemplateList(obj.(*v1alpha2.ResourceClaimTemplateList))
}) })
return nil return nil
} }
func SetObjectDefaults_ResourceClaim(in *v1alpha1.ResourceClaim) { func SetObjectDefaults_ResourceClaim(in *v1alpha2.ResourceClaim) {
SetDefaults_ResourceClaimSpec(&in.Spec) SetDefaults_ResourceClaimSpec(&in.Spec)
} }
func SetObjectDefaults_ResourceClaimList(in *v1alpha1.ResourceClaimList) { func SetObjectDefaults_ResourceClaimList(in *v1alpha2.ResourceClaimList) {
for i := range in.Items { for i := range in.Items {
a := &in.Items[i] a := &in.Items[i]
SetObjectDefaults_ResourceClaim(a) SetObjectDefaults_ResourceClaim(a)
} }
} }
func SetObjectDefaults_ResourceClaimTemplate(in *v1alpha1.ResourceClaimTemplate) { func SetObjectDefaults_ResourceClaimTemplate(in *v1alpha2.ResourceClaimTemplate) {
SetDefaults_ResourceClaimSpec(&in.Spec.Spec) SetDefaults_ResourceClaimSpec(&in.Spec.Spec)
} }
func SetObjectDefaults_ResourceClaimTemplateList(in *v1alpha1.ResourceClaimTemplateList) { func SetObjectDefaults_ResourceClaimTemplateList(in *v1alpha2.ResourceClaimTemplateList) {
for i := range in.Items { for i := range in.Items {
a := &in.Items[i] a := &in.Items[i]
SetObjectDefaults_ResourceClaimTemplate(a) SetObjectDefaults_ResourceClaimTemplate(a)

View File

@ -23,18 +23,18 @@ import (
"time" "time"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/util/wait"
v1informers "k8s.io/client-go/informers/core/v1" v1informers "k8s.io/client-go/informers/core/v1"
resourcev1alpha1informers "k8s.io/client-go/informers/resource/v1alpha1" resourcev1alpha2informers "k8s.io/client-go/informers/resource/v1alpha2"
clientset "k8s.io/client-go/kubernetes" clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/kubernetes/scheme"
v1core "k8s.io/client-go/kubernetes/typed/core/v1" v1core "k8s.io/client-go/kubernetes/typed/core/v1"
v1listers "k8s.io/client-go/listers/core/v1" v1listers "k8s.io/client-go/listers/core/v1"
resourcev1alpha1listers "k8s.io/client-go/listers/resource/v1alpha1" resourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2"
"k8s.io/client-go/tools/cache" "k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record" "k8s.io/client-go/tools/record"
"k8s.io/client-go/util/workqueue" "k8s.io/client-go/util/workqueue"
@ -60,7 +60,7 @@ type Controller struct {
// claimLister is the shared ResourceClaim lister used to fetch and store ResourceClaim // claimLister is the shared ResourceClaim lister used to fetch and store ResourceClaim
// objects from the API server. It is shared with other controllers and // objects from the API server. It is shared with other controllers and
// therefore the ResourceClaim objects in its store should be treated as immutable. // therefore the ResourceClaim objects in its store should be treated as immutable.
claimLister resourcev1alpha1listers.ResourceClaimLister claimLister resourcev1alpha2listers.ResourceClaimLister
claimsSynced cache.InformerSynced claimsSynced cache.InformerSynced
// podLister is the shared Pod lister used to fetch Pod // podLister is the shared Pod lister used to fetch Pod
@ -73,7 +73,7 @@ type Controller struct {
// fetch template objects from the API server. It is shared with other // fetch template objects from the API server. It is shared with other
// controllers and therefore the objects in its store should be treated // controllers and therefore the objects in its store should be treated
// as immutable. // as immutable.
templateLister resourcev1alpha1listers.ResourceClaimTemplateLister templateLister resourcev1alpha2listers.ResourceClaimTemplateLister
templatesSynced cache.InformerSynced templatesSynced cache.InformerSynced
// podIndexer has the common PodResourceClaim indexer indexer installed To // podIndexer has the common PodResourceClaim indexer indexer installed To
@ -100,8 +100,8 @@ const (
func NewController( func NewController(
kubeClient clientset.Interface, kubeClient clientset.Interface,
podInformer v1informers.PodInformer, podInformer v1informers.PodInformer,
claimInformer resourcev1alpha1informers.ResourceClaimInformer, claimInformer resourcev1alpha2informers.ResourceClaimInformer,
templateInformer resourcev1alpha1informers.ResourceClaimTemplateInformer) (*Controller, error) { templateInformer resourcev1alpha2informers.ResourceClaimTemplateInformer) (*Controller, error) {
ec := &Controller{ ec := &Controller{
kubeClient: kubeClient, kubeClient: kubeClient,
@ -190,7 +190,7 @@ func (ec *Controller) enqueuePod(obj interface{}, deleted bool) {
} }
func (ec *Controller) onResourceClaimAddOrUpdate(obj interface{}) { func (ec *Controller) onResourceClaimAddOrUpdate(obj interface{}) {
claim, ok := obj.(*resourcev1alpha1.ResourceClaim) claim, ok := obj.(*resourcev1alpha2.ResourceClaim)
if !ok { if !ok {
return return
} }
@ -202,7 +202,7 @@ func (ec *Controller) onResourceClaimAddOrUpdate(obj interface{}) {
} }
func (ec *Controller) onResourceClaimDelete(obj interface{}) { func (ec *Controller) onResourceClaimDelete(obj interface{}) {
claim, ok := obj.(*resourcev1alpha1.ResourceClaim) claim, ok := obj.(*resourcev1alpha2.ResourceClaim)
if !ok { if !ok {
return return
} }
@ -356,7 +356,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1.
// Create the ResourceClaim with pod as owner. // Create the ResourceClaim with pod as owner.
isTrue := true isTrue := true
claim = &resourcev1alpha1.ResourceClaim{ claim = &resourcev1alpha2.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: claimName, Name: claimName,
OwnerReferences: []metav1.OwnerReference{ OwnerReferences: []metav1.OwnerReference{
@ -375,7 +375,7 @@ func (ec *Controller) handleClaim(ctx context.Context, pod *v1.Pod, podClaim v1.
Spec: template.Spec.Spec, Spec: template.Spec.Spec,
} }
metrics.ResourceClaimCreateAttempts.Inc() metrics.ResourceClaimCreateAttempts.Inc()
_, err = ec.kubeClient.ResourceV1alpha1().ResourceClaims(pod.Namespace).Create(ctx, claim, metav1.CreateOptions{}) _, err = ec.kubeClient.ResourceV1alpha2().ResourceClaims(pod.Namespace).Create(ctx, claim, metav1.CreateOptions{})
if err != nil { if err != nil {
metrics.ResourceClaimCreateFailures.Inc() metrics.ResourceClaimCreateFailures.Inc()
return fmt.Errorf("create ResourceClaim %s: %v", claimName, err) return fmt.Errorf("create ResourceClaim %s: %v", claimName, err)
@ -396,7 +396,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
} }
// Check if the ReservedFor entries are all still valid. // Check if the ReservedFor entries are all still valid.
valid := make([]resourcev1alpha1.ResourceClaimConsumerReference, 0, len(claim.Status.ReservedFor)) valid := make([]resourcev1alpha2.ResourceClaimConsumerReference, 0, len(claim.Status.ReservedFor))
for _, reservedFor := range claim.Status.ReservedFor { for _, reservedFor := range claim.Status.ReservedFor {
if reservedFor.APIGroup == "" && if reservedFor.APIGroup == "" &&
reservedFor.Resource == "pods" { reservedFor.Resource == "pods" {
@ -455,7 +455,7 @@ func (ec *Controller) syncClaim(ctx context.Context, namespace, name string) err
// TODO (#113700): patch // TODO (#113700): patch
claim := claim.DeepCopy() claim := claim.DeepCopy()
claim.Status.ReservedFor = valid claim.Status.ReservedFor = valid
_, err := ec.kubeClient.ResourceV1alpha1().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) _, err := ec.kubeClient.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{})
if err != nil { if err != nil {
return err return err
} }

View File

@ -25,7 +25,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
@ -53,10 +53,10 @@ var (
testPodWithResource = makePod(testPodName, testNamespace, testPodUID, *makePodResourceClaim(podResourceClaimName, templateName)) testPodWithResource = makePod(testPodName, testNamespace, testPodUID, *makePodResourceClaim(podResourceClaimName, templateName))
otherTestPod = makePod(testPodName+"-II", testNamespace, testPodUID+"-II") otherTestPod = makePod(testPodName+"-II", testNamespace, testPodUID+"-II")
testClaim = makeClaim(testPodName+"-"+podResourceClaimName, testNamespace, className, makeOwnerReference(testPodWithResource, true)) testClaim = makeClaim(testPodName+"-"+podResourceClaimName, testNamespace, className, makeOwnerReference(testPodWithResource, true))
testClaimReserved = func() *resourcev1alpha1.ResourceClaim { testClaimReserved = func() *resourcev1alpha2.ResourceClaim {
claim := testClaim.DeepCopy() claim := testClaim.DeepCopy()
claim.Status.ReservedFor = append(claim.Status.ReservedFor, claim.Status.ReservedFor = append(claim.Status.ReservedFor,
resourcev1alpha1.ResourceClaimConsumerReference{ resourcev1alpha2.ResourceClaimConsumerReference{
Resource: "pods", Resource: "pods",
Name: testPodWithResource.Name, Name: testPodWithResource.Name,
UID: testPodWithResource.UID, UID: testPodWithResource.UID,
@ -64,10 +64,10 @@ var (
) )
return claim return claim
}() }()
testClaimReservedTwice = func() *resourcev1alpha1.ResourceClaim { testClaimReservedTwice = func() *resourcev1alpha2.ResourceClaim {
claim := testClaimReserved.DeepCopy() claim := testClaimReserved.DeepCopy()
claim.Status.ReservedFor = append(claim.Status.ReservedFor, claim.Status.ReservedFor = append(claim.Status.ReservedFor,
resourcev1alpha1.ResourceClaimConsumerReference{ resourcev1alpha2.ResourceClaimConsumerReference{
Resource: "pods", Resource: "pods",
Name: otherTestPod.Name, Name: otherTestPod.Name,
UID: otherTestPod.UID, UID: otherTestPod.UID,
@ -88,20 +88,20 @@ func TestSyncHandler(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
key string key string
claims []*resourcev1alpha1.ResourceClaim claims []*resourcev1alpha2.ResourceClaim
pods []*v1.Pod pods []*v1.Pod
podsLater []*v1.Pod podsLater []*v1.Pod
templates []*resourcev1alpha1.ResourceClaimTemplate templates []*resourcev1alpha2.ResourceClaimTemplate
expectedClaims []resourcev1alpha1.ResourceClaim expectedClaims []resourcev1alpha2.ResourceClaim
expectedError bool expectedError bool
expectedMetrics expectedMetrics expectedMetrics expectedMetrics
}{ }{
{ {
name: "create", name: "create",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
templates: []*resourcev1alpha1.ResourceClaimTemplate{template}, templates: []*resourcev1alpha2.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
expectedClaims: []resourcev1alpha1.ResourceClaim{*testClaim}, expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaim},
expectedMetrics: expectedMetrics{1, 0}, expectedMetrics: expectedMetrics{1, 0},
}, },
{ {
@ -115,8 +115,8 @@ func TestSyncHandler(t *testing.T) {
name: "nop", name: "nop",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha1.ResourceClaim{testClaim}, claims: []*resourcev1alpha2.ResourceClaim{testClaim},
expectedClaims: []resourcev1alpha1.ResourceClaim{*testClaim}, expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaim},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
@ -141,24 +141,24 @@ func TestSyncHandler(t *testing.T) {
{ {
name: "create-with-other-claim", name: "create-with-other-claim",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
templates: []*resourcev1alpha1.ResourceClaimTemplate{template}, templates: []*resourcev1alpha2.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha1.ResourceClaim{otherNamespaceClaim}, claims: []*resourcev1alpha2.ResourceClaim{otherNamespaceClaim},
expectedClaims: []resourcev1alpha1.ResourceClaim{*otherNamespaceClaim, *testClaim}, expectedClaims: []resourcev1alpha2.ResourceClaim{*otherNamespaceClaim, *testClaim},
expectedMetrics: expectedMetrics{1, 0}, expectedMetrics: expectedMetrics{1, 0},
}, },
{ {
name: "wrong-claim-owner", name: "wrong-claim-owner",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
claims: []*resourcev1alpha1.ResourceClaim{conflictingClaim}, claims: []*resourcev1alpha2.ResourceClaim{conflictingClaim},
expectedClaims: []resourcev1alpha1.ResourceClaim{*conflictingClaim}, expectedClaims: []resourcev1alpha2.ResourceClaim{*conflictingClaim},
expectedError: true, expectedError: true,
}, },
{ {
name: "create-conflict", name: "create-conflict",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
templates: []*resourcev1alpha1.ResourceClaimTemplate{template}, templates: []*resourcev1alpha2.ResourceClaimTemplate{template},
key: podKey(testPodWithResource), key: podKey(testPodWithResource),
expectedMetrics: expectedMetrics{1, 1}, expectedMetrics: expectedMetrics{1, 1},
expectedError: true, expectedError: true,
@ -167,32 +167,32 @@ func TestSyncHandler(t *testing.T) {
name: "stay-reserved-seen", name: "stay-reserved-seen",
pods: []*v1.Pod{testPodWithResource}, pods: []*v1.Pod{testPodWithResource},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha1.ResourceClaim{testClaimReserved}, claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved},
expectedClaims: []resourcev1alpha1.ResourceClaim{*testClaimReserved}, expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
name: "stay-reserved-not-seen", name: "stay-reserved-not-seen",
podsLater: []*v1.Pod{testPodWithResource}, podsLater: []*v1.Pod{testPodWithResource},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha1.ResourceClaim{testClaimReserved}, claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved},
expectedClaims: []resourcev1alpha1.ResourceClaim{*testClaimReserved}, expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
name: "clear-reserved", name: "clear-reserved",
pods: []*v1.Pod{}, pods: []*v1.Pod{},
key: claimKey(testClaimReserved), key: claimKey(testClaimReserved),
claims: []*resourcev1alpha1.ResourceClaim{testClaimReserved}, claims: []*resourcev1alpha2.ResourceClaim{testClaimReserved},
expectedClaims: []resourcev1alpha1.ResourceClaim{*testClaim}, expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaim},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
{ {
name: "remove-reserved", name: "remove-reserved",
pods: []*v1.Pod{testPod}, pods: []*v1.Pod{testPod},
key: claimKey(testClaimReservedTwice), key: claimKey(testClaimReservedTwice),
claims: []*resourcev1alpha1.ResourceClaim{testClaimReservedTwice}, claims: []*resourcev1alpha2.ResourceClaim{testClaimReservedTwice},
expectedClaims: []resourcev1alpha1.ResourceClaim{*testClaimReserved}, expectedClaims: []resourcev1alpha2.ResourceClaim{*testClaimReserved},
expectedMetrics: expectedMetrics{0, 0}, expectedMetrics: expectedMetrics{0, 0},
}, },
} }
@ -223,8 +223,8 @@ func TestSyncHandler(t *testing.T) {
setupMetrics() setupMetrics()
informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, controller.NoResyncPeriodFunc()) informerFactory := informers.NewSharedInformerFactory(fakeKubeClient, controller.NoResyncPeriodFunc())
podInformer := informerFactory.Core().V1().Pods() podInformer := informerFactory.Core().V1().Pods()
claimInformer := informerFactory.Resource().V1alpha1().ResourceClaims() claimInformer := informerFactory.Resource().V1alpha2().ResourceClaims()
templateInformer := informerFactory.Resource().V1alpha1().ResourceClaimTemplates() templateInformer := informerFactory.Resource().V1alpha2().ResourceClaimTemplates()
ec, err := NewController(fakeKubeClient, podInformer, claimInformer, templateInformer) ec, err := NewController(fakeKubeClient, podInformer, claimInformer, templateInformer)
if err != nil { if err != nil {
@ -258,7 +258,7 @@ func TestSyncHandler(t *testing.T) {
t.Fatalf("unexpected success") t.Fatalf("unexpected success")
} }
claims, err := fakeKubeClient.ResourceV1alpha1().ResourceClaims("").List(ctx, metav1.ListOptions{}) claims, err := fakeKubeClient.ResourceV1alpha2().ResourceClaims("").List(ctx, metav1.ListOptions{})
if err != nil { if err != nil {
t.Fatalf("unexpected error while listing claims: %v", err) t.Fatalf("unexpected error while listing claims: %v", err)
} }
@ -268,10 +268,10 @@ func TestSyncHandler(t *testing.T) {
} }
} }
func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourcev1alpha1.ResourceClaim { func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourcev1alpha2.ResourceClaim {
claim := &resourcev1alpha1.ResourceClaim{ claim := &resourcev1alpha2.ResourceClaim{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
Spec: resourcev1alpha1.ResourceClaimSpec{ Spec: resourcev1alpha2.ResourceClaimSpec{
ResourceClassName: classname, ResourceClassName: classname,
}, },
} }
@ -302,11 +302,11 @@ func makePod(name, namespace string, uid types.UID, podClaims ...v1.PodResourceC
return pod return pod
} }
func makeTemplate(name, namespace, classname string) *resourcev1alpha1.ResourceClaimTemplate { func makeTemplate(name, namespace, classname string) *resourcev1alpha2.ResourceClaimTemplate {
template := &resourcev1alpha1.ResourceClaimTemplate{ template := &resourcev1alpha2.ResourceClaimTemplate{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace}, ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
Spec: resourcev1alpha1.ResourceClaimTemplateSpec{ Spec: resourcev1alpha2.ResourceClaimTemplateSpec{
Spec: resourcev1alpha1.ResourceClaimSpec{ Spec: resourcev1alpha2.ResourceClaimSpec{
ResourceClassName: classname, ResourceClassName: classname,
}, },
}, },
@ -318,7 +318,7 @@ func podKey(pod *v1.Pod) string {
return podKeyPrefix + pod.Namespace + "/" + pod.Name return podKeyPrefix + pod.Namespace + "/" + pod.Name
} }
func claimKey(claim *resourcev1alpha1.ResourceClaim) string { func claimKey(claim *resourcev1alpha2.ResourceClaim) string {
return claimKeyPrefix + claim.Namespace + "/" + claim.Name return claimKeyPrefix + claim.Namespace + "/" + claim.Name
} }
@ -334,7 +334,7 @@ func makeOwnerReference(pod *v1.Pod, isController bool) *metav1.OwnerReference {
} }
} }
func normalizeClaims(claims []resourcev1alpha1.ResourceClaim) []resourcev1alpha1.ResourceClaim { func normalizeClaims(claims []resourcev1alpha2.ResourceClaim) []resourcev1alpha2.ResourceClaim {
sort.Slice(claims, func(i, j int) bool { sort.Slice(claims, func(i, j int) bool {
return claims[i].Namespace < claims[j].Namespace || return claims[i].Namespace < claims[j].Namespace ||
claims[i].Name < claims[j].Name claims[i].Name < claims[j].Name

View File

@ -54,7 +54,7 @@ import (
policyapiv1 "k8s.io/api/policy/v1" policyapiv1 "k8s.io/api/policy/v1"
policyapiv1beta1 "k8s.io/api/policy/v1beta1" policyapiv1beta1 "k8s.io/api/policy/v1beta1"
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingapiv1 "k8s.io/api/scheduling/v1" schedulingapiv1 "k8s.io/api/scheduling/v1"
storageapiv1 "k8s.io/api/storage/v1" storageapiv1 "k8s.io/api/storage/v1"
storageapiv1alpha1 "k8s.io/api/storage/v1alpha1" storageapiv1alpha1 "k8s.io/api/storage/v1alpha1"
@ -732,7 +732,7 @@ var (
admissionregistrationv1alpha1.SchemeGroupVersion, admissionregistrationv1alpha1.SchemeGroupVersion,
apiserverinternalv1alpha1.SchemeGroupVersion, apiserverinternalv1alpha1.SchemeGroupVersion,
authenticationv1alpha1.SchemeGroupVersion, authenticationv1alpha1.SchemeGroupVersion,
resourcev1alpha1.SchemeGroupVersion, resourcev1alpha2.SchemeGroupVersion,
networkingapiv1alpha1.SchemeGroupVersion, networkingapiv1alpha1.SchemeGroupVersion,
storageapiv1alpha1.SchemeGroupVersion, storageapiv1alpha1.SchemeGroupVersion,
flowcontrolv1alpha1.SchemeGroupVersion, flowcontrolv1alpha1.SchemeGroupVersion,

View File

@ -824,24 +824,24 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref), "k8s.io/api/rbac/v1beta1.RoleList": schema_k8sio_api_rbac_v1beta1_RoleList(ref),
"k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref), "k8s.io/api/rbac/v1beta1.RoleRef": schema_k8sio_api_rbac_v1beta1_RoleRef(ref),
"k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref), "k8s.io/api/rbac/v1beta1.Subject": schema_k8sio_api_rbac_v1beta1_Subject(ref),
"k8s.io/api/resource/v1alpha1.AllocationResult": schema_k8sio_api_resource_v1alpha1_AllocationResult(ref), "k8s.io/api/resource/v1alpha2.AllocationResult": schema_k8sio_api_resource_v1alpha2_AllocationResult(ref),
"k8s.io/api/resource/v1alpha1.PodScheduling": schema_k8sio_api_resource_v1alpha1_PodScheduling(ref), "k8s.io/api/resource/v1alpha2.PodScheduling": schema_k8sio_api_resource_v1alpha2_PodScheduling(ref),
"k8s.io/api/resource/v1alpha1.PodSchedulingList": schema_k8sio_api_resource_v1alpha1_PodSchedulingList(ref), "k8s.io/api/resource/v1alpha2.PodSchedulingList": schema_k8sio_api_resource_v1alpha2_PodSchedulingList(ref),
"k8s.io/api/resource/v1alpha1.PodSchedulingSpec": schema_k8sio_api_resource_v1alpha1_PodSchedulingSpec(ref), "k8s.io/api/resource/v1alpha2.PodSchedulingSpec": schema_k8sio_api_resource_v1alpha2_PodSchedulingSpec(ref),
"k8s.io/api/resource/v1alpha1.PodSchedulingStatus": schema_k8sio_api_resource_v1alpha1_PodSchedulingStatus(ref), "k8s.io/api/resource/v1alpha2.PodSchedulingStatus": schema_k8sio_api_resource_v1alpha2_PodSchedulingStatus(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaim": schema_k8sio_api_resource_v1alpha1_ResourceClaim(ref), "k8s.io/api/resource/v1alpha2.ResourceClaim": schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha1_ResourceClaimConsumerReference(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimConsumerReference(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimList": schema_k8sio_api_resource_v1alpha1_ResourceClaimList(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimList": schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha1_ResourceClaimParametersReference(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha1_ResourceClaimSchedulingStatus(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus": schema_k8sio_api_resource_v1alpha2_ResourceClaimSchedulingStatus(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha1_ResourceClaimSpec(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimStatus": schema_k8sio_api_resource_v1alpha1_ResourceClaimStatus(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimStatus": schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimTemplate": schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplate(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimTemplate": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimTemplateList": schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateList(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimTemplateList": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref),
"k8s.io/api/resource/v1alpha1.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateSpec(ref), "k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec": schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref),
"k8s.io/api/resource/v1alpha1.ResourceClass": schema_k8sio_api_resource_v1alpha1_ResourceClass(ref), "k8s.io/api/resource/v1alpha2.ResourceClass": schema_k8sio_api_resource_v1alpha2_ResourceClass(ref),
"k8s.io/api/resource/v1alpha1.ResourceClassList": schema_k8sio_api_resource_v1alpha1_ResourceClassList(ref), "k8s.io/api/resource/v1alpha2.ResourceClassList": schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref),
"k8s.io/api/resource/v1alpha1.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha1_ResourceClassParametersReference(ref), "k8s.io/api/resource/v1alpha2.ResourceClassParametersReference": schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref),
"k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref), "k8s.io/api/scheduling/v1.PriorityClass": schema_k8sio_api_scheduling_v1_PriorityClass(ref),
"k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref), "k8s.io/api/scheduling/v1.PriorityClassList": schema_k8sio_api_scheduling_v1_PriorityClassList(ref),
"k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref), "k8s.io/api/scheduling/v1alpha1.PriorityClass": schema_k8sio_api_scheduling_v1alpha1_PriorityClass(ref),
@ -41121,7 +41121,7 @@ func schema_k8sio_api_rbac_v1beta1_Subject(ref common.ReferenceCallback) common.
} }
} }
func schema_k8sio_api_resource_v1alpha1_AllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_AllocationResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41156,7 +41156,7 @@ func schema_k8sio_api_resource_v1alpha1_AllocationResult(ref common.ReferenceCal
} }
} }
func schema_k8sio_api_resource_v1alpha1_PodScheduling(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_PodScheduling(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41188,14 +41188,14 @@ func schema_k8sio_api_resource_v1alpha1_PodScheduling(ref common.ReferenceCallba
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Spec describes where resources for the Pod are needed.", Description: "Spec describes where resources for the Pod are needed.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.PodSchedulingSpec"), Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingSpec"),
}, },
}, },
"status": { "status": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Status describes where resources for the Pod can be allocated.", Description: "Status describes where resources for the Pod can be allocated.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.PodSchedulingStatus"), Ref: ref("k8s.io/api/resource/v1alpha2.PodSchedulingStatus"),
}, },
}, },
}, },
@ -41203,11 +41203,11 @@ func schema_k8sio_api_resource_v1alpha1_PodScheduling(ref common.ReferenceCallba
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.PodSchedulingSpec", "k8s.io/api/resource/v1alpha1.PodSchedulingStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha2.PodSchedulingSpec", "k8s.io/api/resource/v1alpha2.PodSchedulingStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_PodSchedulingList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_PodSchedulingList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41243,7 +41243,7 @@ func schema_k8sio_api_resource_v1alpha1_PodSchedulingList(ref common.ReferenceCa
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.PodScheduling"), Ref: ref("k8s.io/api/resource/v1alpha2.PodScheduling"),
}, },
}, },
}, },
@ -41254,11 +41254,11 @@ func schema_k8sio_api_resource_v1alpha1_PodSchedulingList(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.PodScheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha2.PodScheduling", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_PodSchedulingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_PodSchedulingSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41298,7 +41298,7 @@ func schema_k8sio_api_resource_v1alpha1_PodSchedulingSpec(ref common.ReferenceCa
} }
} }
func schema_k8sio_api_resource_v1alpha1_PodSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_PodSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41321,7 +41321,7 @@ func schema_k8sio_api_resource_v1alpha1_PodSchedulingStatus(ref common.Reference
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimSchedulingStatus"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus"),
}, },
}, },
}, },
@ -41331,11 +41331,11 @@ func schema_k8sio_api_resource_v1alpha1_PodSchedulingStatus(ref common.Reference
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClaimSchedulingStatus"}, "k8s.io/api/resource/v1alpha2.ResourceClaimSchedulingStatus"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaim(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41367,14 +41367,14 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaim(ref common.ReferenceCallba
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim.", Description: "Spec describes the desired attributes of a resource that then needs to be allocated. It can only be set once when creating the ResourceClaim.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimSpec"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSpec"),
}, },
}, },
"status": { "status": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Status describes whether the resource is available and with which attributes.", Description: "Status describes whether the resource is available and with which attributes.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimStatus"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimStatus"),
}, },
}, },
}, },
@ -41382,11 +41382,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaim(ref common.ReferenceCallba
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClaimSpec", "k8s.io/api/resource/v1alpha1.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha2.ResourceClaimSpec", "k8s.io/api/resource/v1alpha2.ResourceClaimStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimConsumerReference(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimConsumerReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41431,7 +41431,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimConsumerReference(ref commo
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41467,7 +41467,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimList(ref common.ReferenceCa
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaim"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaim"),
}, },
}, },
}, },
@ -41478,11 +41478,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimList(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha2.ResourceClaim", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41519,7 +41519,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimParametersReference(ref com
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimSchedulingStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41559,7 +41559,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimSchedulingStatus(ref common
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41577,7 +41577,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimSpec(ref common.ReferenceCa
"parametersRef": { "parametersRef": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.\n\nThe object must be in the same namespace as the ResourceClaim.", Description: "ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.\n\nThe object must be in the same namespace as the ResourceClaim.",
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimParametersReference"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"),
}, },
}, },
"allocationMode": { "allocationMode": {
@ -41592,11 +41592,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimSpec(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClaimParametersReference"}, "k8s.io/api/resource/v1alpha2.ResourceClaimParametersReference"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41613,7 +41613,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimStatus(ref common.Reference
"allocation": { "allocation": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Allocation is set by the resource driver once a resource has been allocated successfully. If this is not specified, the resource is not yet allocated.", Description: "Allocation is set by the resource driver once a resource has been allocated successfully. If this is not specified, the resource is not yet allocated.",
Ref: ref("k8s.io/api/resource/v1alpha1.AllocationResult"), Ref: ref("k8s.io/api/resource/v1alpha2.AllocationResult"),
}, },
}, },
"reservedFor": { "reservedFor": {
@ -41632,7 +41632,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimStatus(ref common.Reference
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimConsumerReference"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference"),
}, },
}, },
}, },
@ -41649,11 +41649,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimStatus(ref common.Reference
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.AllocationResult", "k8s.io/api/resource/v1alpha1.ResourceClaimConsumerReference"}, "k8s.io/api/resource/v1alpha2.AllocationResult", "k8s.io/api/resource/v1alpha2.ResourceClaimConsumerReference"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41685,7 +41685,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplate(ref common.Referen
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.", Description: "Describes the ResourceClaim that is to be generated.\n\nThis field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimTemplateSpec"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec"),
}, },
}, },
}, },
@ -41693,11 +41693,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplate(ref common.Referen
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha2.ResourceClaimTemplateSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41733,7 +41733,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateList(ref common.Ref
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimTemplate"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimTemplate"),
}, },
}, },
}, },
@ -41744,11 +41744,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateList(ref common.Ref
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha2.ResourceClaimTemplate", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClaimTemplateSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41766,7 +41766,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateSpec(ref common.Ref
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.", Description: "Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.",
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClaimSpec"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClaimSpec"),
}, },
}, },
}, },
@ -41774,11 +41774,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClaimTemplateSpec(ref common.Ref
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/resource/v1alpha2.ResourceClaimSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClass(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClass(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41817,7 +41817,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClass(ref common.ReferenceCallba
"parametersRef": { "parametersRef": {
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Description: "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.", Description: "ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.",
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClassParametersReference"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClassParametersReference"),
}, },
}, },
"suitableNodes": { "suitableNodes": {
@ -41831,11 +41831,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClass(ref common.ReferenceCallba
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha1.ResourceClassParametersReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, "k8s.io/api/core/v1.NodeSelector", "k8s.io/api/resource/v1alpha2.ResourceClassParametersReference", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClassList(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClassList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
@ -41871,7 +41871,7 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClassList(ref common.ReferenceCa
Schema: &spec.Schema{ Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{}, Default: map[string]interface{}{},
Ref: ref("k8s.io/api/resource/v1alpha1.ResourceClass"), Ref: ref("k8s.io/api/resource/v1alpha2.ResourceClass"),
}, },
}, },
}, },
@ -41882,11 +41882,11 @@ func schema_k8sio_api_resource_v1alpha1_ResourceClassList(ref common.ReferenceCa
}, },
}, },
Dependencies: []string{ Dependencies: []string{
"k8s.io/api/resource/v1alpha1.ResourceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, "k8s.io/api/resource/v1alpha2.ResourceClass", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
} }
} }
func schema_k8sio_api_resource_v1alpha1_ResourceClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition { func schema_k8sio_api_resource_v1alpha2_ResourceClassParametersReference(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{ return common.OpenAPIDefinition{
Schema: spec.Schema{ Schema: spec.Schema{
SchemaProps: spec.SchemaProps{ SchemaProps: spec.SchemaProps{

View File

@ -80,7 +80,7 @@ rules:
- k8s.io/kubernetes/pkg/apis/rbac/v1beta1 - k8s.io/kubernetes/pkg/apis/rbac/v1beta1
- k8s.io/kubernetes/pkg/apis/resource - k8s.io/kubernetes/pkg/apis/resource
- k8s.io/kubernetes/pkg/apis/resource/install - k8s.io/kubernetes/pkg/apis/resource/install
- k8s.io/kubernetes/pkg/apis/resource/v1alpha1 - k8s.io/kubernetes/pkg/apis/resource/v1alpha2
- k8s.io/kubernetes/pkg/apis/scheduling - k8s.io/kubernetes/pkg/apis/scheduling
- k8s.io/kubernetes/pkg/apis/scheduling/install - k8s.io/kubernetes/pkg/apis/scheduling/install
- k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1 - k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1

View File

@ -87,7 +87,7 @@ func (m *ManagerImpl) PrepareResources(pod *v1.Pod) error {
} }
// Query claim object from the API server // Query claim object from the API server
resourceClaim, err := m.kubeClient.ResourceV1alpha1().ResourceClaims(pod.Namespace).Get( resourceClaim, err := m.kubeClient.ResourceV1alpha2().ResourceClaims(pod.Namespace).Get(
context.TODO(), context.TODO(),
claimName, claimName,
metav1.GetOptions{}) metav1.GetOptions{})

View File

@ -39,7 +39,7 @@ import (
flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3" flowcontrolv1beta3 "k8s.io/api/flowcontrol/v1beta3"
networkingv1alpha1 "k8s.io/api/networking/v1alpha1" networkingv1alpha1 "k8s.io/api/networking/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
storagev1 "k8s.io/api/storage/v1" storagev1 "k8s.io/api/storage/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -613,7 +613,7 @@ func AddHandlers(h printers.PrintHandler) {
resourceClassColumnDefinitions := []metav1.TableColumnDefinition{ resourceClassColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "DriverName", Type: "string", Description: resourcev1alpha1.ResourceClass{}.SwaggerDoc()["driverName"]}, {Name: "DriverName", Type: "string", Description: resourcev1alpha2.ResourceClass{}.SwaggerDoc()["driverName"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(resourceClassColumnDefinitions, printResourceClass) _ = h.TableHandler(resourceClassColumnDefinitions, printResourceClass)
@ -621,8 +621,8 @@ func AddHandlers(h printers.PrintHandler) {
resourceClaimColumnDefinitions := []metav1.TableColumnDefinition{ resourceClaimColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "ResourceClassName", Type: "string", Description: resourcev1alpha1.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, {Name: "ResourceClassName", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]},
{Name: "AllocationMode", Type: "string", Description: resourcev1alpha1.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]}, {Name: "AllocationMode", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]},
{Name: "State", Type: "string", Description: "A summary of the current state (allocated, pending, reserved, etc.)."}, {Name: "State", Type: "string", Description: "A summary of the current state (allocated, pending, reserved, etc.)."},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
@ -631,8 +631,8 @@ func AddHandlers(h printers.PrintHandler) {
resourceClaimTemplateColumnDefinitions := []metav1.TableColumnDefinition{ resourceClaimTemplateColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "ResourceClassName", Type: "string", Description: resourcev1alpha1.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]}, {Name: "ResourceClassName", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["resourceClassName"]},
{Name: "AllocationMode", Type: "string", Description: resourcev1alpha1.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]}, {Name: "AllocationMode", Type: "string", Description: resourcev1alpha2.ResourceClaimSpec{}.SwaggerDoc()["allocationMode"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(resourceClaimTemplateColumnDefinitions, printResourceClaimTemplate) _ = h.TableHandler(resourceClaimTemplateColumnDefinitions, printResourceClaimTemplate)
@ -640,7 +640,7 @@ func AddHandlers(h printers.PrintHandler) {
podSchedulingColumnDefinitions := []metav1.TableColumnDefinition{ podSchedulingColumnDefinitions := []metav1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]}, {Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "SelectedNode", Type: "string", Description: resourcev1alpha1.PodSchedulingSpec{}.SwaggerDoc()["selectedNode"]}, {Name: "SelectedNode", Type: "string", Description: resourcev1alpha2.PodSchedulingSpec{}.SwaggerDoc()["selectedNode"]},
{Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]}, {Name: "Age", Type: "string", Description: metav1.ObjectMeta{}.SwaggerDoc()["creationTimestamp"]},
} }
_ = h.TableHandler(podSchedulingColumnDefinitions, printPodScheduling) _ = h.TableHandler(podSchedulingColumnDefinitions, printPodScheduling)

View File

@ -52,7 +52,7 @@ func (podSchedulingStrategy) NamespaceScoped() bool {
// status. // status.
func (podSchedulingStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (podSchedulingStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha1": fieldpath.NewSet( "resource.k8s.io/v1alpha2": fieldpath.NewSet(
fieldpath.MakePathOrDie("status"), fieldpath.MakePathOrDie("status"),
), ),
} }
@ -113,7 +113,7 @@ var StatusStrategy = podSchedulingStatusStrategy{Strategy}
// should not be modified by the user. For a status update that is the spec. // should not be modified by the user. For a status update that is the spec.
func (podSchedulingStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (podSchedulingStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha1": fieldpath.NewSet( "resource.k8s.io/v1alpha2": fieldpath.NewSet(
fieldpath.MakePathOrDie("spec"), fieldpath.MakePathOrDie("spec"),
), ),
} }

View File

@ -52,7 +52,7 @@ func (resourceclaimStrategy) NamespaceScoped() bool {
// status. // status.
func (resourceclaimStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (resourceclaimStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha1": fieldpath.NewSet( "resource.k8s.io/v1alpha2": fieldpath.NewSet(
fieldpath.MakePathOrDie("status"), fieldpath.MakePathOrDie("status"),
), ),
} }
@ -113,7 +113,7 @@ var StatusStrategy = resourceclaimStatusStrategy{Strategy}
// should not be modified by the user. For a status update that is the spec. // should not be modified by the user. For a status update that is the spec.
func (resourceclaimStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set { func (resourceclaimStatusStrategy) GetResetFields() map[fieldpath.APIVersion]*fieldpath.Set {
fields := map[fieldpath.APIVersion]*fieldpath.Set{ fields := map[fieldpath.APIVersion]*fieldpath.Set{
"resource.k8s.io/v1alpha1": fieldpath.NewSet( "resource.k8s.io/v1alpha2": fieldpath.NewSet(
fieldpath.MakePathOrDie("spec"), fieldpath.MakePathOrDie("spec"),
), ),
} }

View File

@ -17,7 +17,7 @@ limitations under the License.
package rest package rest
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apiserver/pkg/registry/generic" "k8s.io/apiserver/pkg/registry/generic"
"k8s.io/apiserver/pkg/registry/rest" "k8s.io/apiserver/pkg/registry/rest"
genericapiserver "k8s.io/apiserver/pkg/server" genericapiserver "k8s.io/apiserver/pkg/server"
@ -37,19 +37,19 @@ func (p RESTStorageProvider) NewRESTStorage(apiResourceConfigSource serverstorag
// If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities. // If you add a version here, be sure to add an entry in `k8s.io/kubernetes/cmd/kube-apiserver/app/aggregator.go with specific priorities.
// TODO refactor the plumbing to provide the information in the APIGroupInfo // TODO refactor the plumbing to provide the information in the APIGroupInfo
if storageMap, err := p.v1alpha1Storage(apiResourceConfigSource, restOptionsGetter); err != nil { if storageMap, err := p.v1alpha2Storage(apiResourceConfigSource, restOptionsGetter); err != nil {
return genericapiserver.APIGroupInfo{}, err return genericapiserver.APIGroupInfo{}, err
} else if len(storageMap) > 0 { } else if len(storageMap) > 0 {
apiGroupInfo.VersionedResourcesStorageMap[resourcev1alpha1.SchemeGroupVersion.Version] = storageMap apiGroupInfo.VersionedResourcesStorageMap[resourcev1alpha2.SchemeGroupVersion.Version] = storageMap
} }
return apiGroupInfo, nil return apiGroupInfo, nil
} }
func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) { func (p RESTStorageProvider) v1alpha2Storage(apiResourceConfigSource serverstorage.APIResourceConfigSource, restOptionsGetter generic.RESTOptionsGetter) (map[string]rest.Storage, error) {
storage := map[string]rest.Storage{} storage := map[string]rest.Storage{}
if resource := "resourceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha1.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclasses"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) {
resourceClassStorage, err := resourceclassstore.NewREST(restOptionsGetter) resourceClassStorage, err := resourceclassstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -57,7 +57,7 @@ func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstora
storage[resource] = resourceClassStorage storage[resource] = resourceClassStorage
} }
if resource := "resourceclaims"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha1.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclaims"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) {
resourceClaimStorage, resourceClaimStatusStorage, err := resourceclaimstore.NewREST(restOptionsGetter) resourceClaimStorage, resourceClaimStatusStorage, err := resourceclaimstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -66,7 +66,7 @@ func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstora
storage[resource+"/status"] = resourceClaimStatusStorage storage[resource+"/status"] = resourceClaimStatusStorage
} }
if resource := "resourceclaimtemplates"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha1.SchemeGroupVersion.WithResource(resource)) { if resource := "resourceclaimtemplates"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) {
resourceClaimTemplateStorage, err := resourceclaimtemplatestore.NewREST(restOptionsGetter) resourceClaimTemplateStorage, err := resourceclaimtemplatestore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err
@ -74,7 +74,7 @@ func (p RESTStorageProvider) v1alpha1Storage(apiResourceConfigSource serverstora
storage[resource] = resourceClaimTemplateStorage storage[resource] = resourceClaimTemplateStorage
} }
if resource := "podschedulings"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha1.SchemeGroupVersion.WithResource(resource)) { if resource := "podschedulings"; apiResourceConfigSource.ResourceEnabled(resourcev1alpha2.SchemeGroupVersion.WithResource(resource)) {
podSchedulingStorage, podSchedulingStatusStorage, err := podschedulingstore.NewREST(restOptionsGetter) podSchedulingStorage, podSchedulingStatusStorage, err := podschedulingstore.NewREST(restOptionsGetter)
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -380,13 +380,13 @@ func addAllEventHandlers(
) )
case framework.PodScheduling: case framework.PodScheduling:
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
_, _ = informerFactory.Resource().V1alpha1().PodSchedulings().Informer().AddEventHandler( _, _ = informerFactory.Resource().V1alpha2().PodSchedulings().Informer().AddEventHandler(
buildEvtResHandler(at, framework.PodScheduling, "PodScheduling"), buildEvtResHandler(at, framework.PodScheduling, "PodScheduling"),
) )
} }
case framework.ResourceClaim: case framework.ResourceClaim:
if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) { if utilfeature.DefaultFeatureGate.Enabled(features.DynamicResourceAllocation) {
_, _ = informerFactory.Resource().V1alpha1().ResourceClaims().Informer().AddEventHandler( _, _ = informerFactory.Resource().V1alpha2().ResourceClaims().Informer().AddEventHandler(
buildEvtResHandler(at, framework.ResourceClaim, "ResourceClaim"), buildEvtResHandler(at, framework.ResourceClaim, "ResourceClaim"),
) )
} }

View File

@ -24,13 +24,13 @@ import (
"sync" "sync"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/sets"
"k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes"
resourcev1alpha1listers "k8s.io/client-go/listers/resource/v1alpha1" resourcev1alpha2listers "k8s.io/client-go/listers/resource/v1alpha2"
corev1helpers "k8s.io/component-helpers/scheduling/corev1" corev1helpers "k8s.io/component-helpers/scheduling/corev1"
"k8s.io/component-helpers/scheduling/corev1/nodeaffinity" "k8s.io/component-helpers/scheduling/corev1/nodeaffinity"
"k8s.io/dynamic-resource-allocation/resourceclaim" "k8s.io/dynamic-resource-allocation/resourceclaim"
@ -58,7 +58,7 @@ type stateData struct {
// the plugin itself successfully does an Update. // the plugin itself successfully does an Update.
// //
// Empty if the Pod has no claims. // Empty if the Pod has no claims.
claims []*resourcev1alpha1.ResourceClaim claims []*resourcev1alpha2.ResourceClaim
// The AvailableOnNodes node filters of the claims converted from the // The AvailableOnNodes node filters of the claims converted from the
// v1 API to nodeaffinity.NodeSelector by PreFilter for repeated // v1 API to nodeaffinity.NodeSelector by PreFilter for repeated
@ -81,7 +81,7 @@ type stateData struct {
// where it might get shared by different plugins. But in practice, // where it might get shared by different plugins. But in practice,
// it is currently only used by dynamic provisioning and thus // it is currently only used by dynamic provisioning and thus
// managed entirely here. // managed entirely here.
podScheduling *resourcev1alpha1.PodScheduling podScheduling *resourcev1alpha2.PodScheduling
// podSchedulingDirty is true if the current copy was locally modified. // podSchedulingDirty is true if the current copy was locally modified.
podSchedulingDirty bool podSchedulingDirty bool
@ -93,10 +93,10 @@ func (d *stateData) Clone() framework.StateData {
return d return d
} }
func (d *stateData) updateClaimStatus(ctx context.Context, clientset kubernetes.Interface, index int, claim *resourcev1alpha1.ResourceClaim) error { func (d *stateData) updateClaimStatus(ctx context.Context, clientset kubernetes.Interface, index int, claim *resourcev1alpha2.ResourceClaim) error {
// TODO (#113700): replace with patch operation. Beware that patching must only succeed if the // TODO (#113700): replace with patch operation. Beware that patching must only succeed if the
// object has not been modified in parallel by someone else. // object has not been modified in parallel by someone else.
claim, err := clientset.ResourceV1alpha1().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) claim, err := clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{})
// TODO: metric for update results, with the operation ("set selected // TODO: metric for update results, with the operation ("set selected
// node", "set PotentialNodes", etc.) as one dimension. // node", "set PotentialNodes", etc.) as one dimension.
if err != nil { if err != nil {
@ -115,7 +115,7 @@ func (d *stateData) updateClaimStatus(ctx context.Context, clientset kubernetes.
// initializePodScheduling can be called concurrently. It returns an existing PodScheduling // initializePodScheduling can be called concurrently. It returns an existing PodScheduling
// object if there is one already, retrieves one if not, or as a last resort creates // object if there is one already, retrieves one if not, or as a last resort creates
// one from scratch. // one from scratch.
func (d *stateData) initializePodScheduling(ctx context.Context, pod *v1.Pod, podSchedulingLister resourcev1alpha1listers.PodSchedulingLister) (*resourcev1alpha1.PodScheduling, error) { func (d *stateData) initializePodScheduling(ctx context.Context, pod *v1.Pod, podSchedulingLister resourcev1alpha2listers.PodSchedulingLister) (*resourcev1alpha2.PodScheduling, error) {
// TODO (#113701): check if this mutex locking can be avoided by calling initializePodScheduling during PreFilter. // TODO (#113701): check if this mutex locking can be avoided by calling initializePodScheduling during PreFilter.
d.mutex.Lock() d.mutex.Lock()
defer d.mutex.Unlock() defer d.mutex.Unlock()
@ -128,7 +128,7 @@ func (d *stateData) initializePodScheduling(ctx context.Context, pod *v1.Pod, po
switch { switch {
case apierrors.IsNotFound(err): case apierrors.IsNotFound(err):
controller := true controller := true
podScheduling = &resourcev1alpha1.PodScheduling{ podScheduling = &resourcev1alpha2.PodScheduling{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: pod.Name, Name: pod.Name,
Namespace: pod.Namespace, Namespace: pod.Namespace,
@ -157,7 +157,7 @@ func (d *stateData) initializePodScheduling(ctx context.Context, pod *v1.Pod, po
} }
// publishPodScheduling creates or updates the PodScheduling object. // publishPodScheduling creates or updates the PodScheduling object.
func (d *stateData) publishPodScheduling(ctx context.Context, clientset kubernetes.Interface, podScheduling *resourcev1alpha1.PodScheduling) error { func (d *stateData) publishPodScheduling(ctx context.Context, clientset kubernetes.Interface, podScheduling *resourcev1alpha2.PodScheduling) error {
d.mutex.Lock() d.mutex.Lock()
defer d.mutex.Unlock() defer d.mutex.Unlock()
@ -174,10 +174,10 @@ func (d *stateData) publishPodScheduling(ctx context.Context, clientset kubernet
logger.V(5).Info(msg, "podscheduling", klog.KObj(podScheduling)) logger.V(5).Info(msg, "podscheduling", klog.KObj(podScheduling))
} }
if podScheduling.UID == "" { if podScheduling.UID == "" {
podScheduling, err = clientset.ResourceV1alpha1().PodSchedulings(podScheduling.Namespace).Create(ctx, podScheduling, metav1.CreateOptions{}) podScheduling, err = clientset.ResourceV1alpha2().PodSchedulings(podScheduling.Namespace).Create(ctx, podScheduling, metav1.CreateOptions{})
} else { } else {
// TODO (#113700): patch here to avoid racing with drivers which update the status. // TODO (#113700): patch here to avoid racing with drivers which update the status.
podScheduling, err = clientset.ResourceV1alpha1().PodSchedulings(podScheduling.Namespace).Update(ctx, podScheduling, metav1.UpdateOptions{}) podScheduling, err = clientset.ResourceV1alpha2().PodSchedulings(podScheduling.Namespace).Update(ctx, podScheduling, metav1.UpdateOptions{})
} }
if err != nil { if err != nil {
return err return err
@ -188,7 +188,7 @@ func (d *stateData) publishPodScheduling(ctx context.Context, clientset kubernet
} }
// storePodScheduling replaces the pod scheduling object in the state. // storePodScheduling replaces the pod scheduling object in the state.
func (d *stateData) storePodScheduling(podScheduling *resourcev1alpha1.PodScheduling) { func (d *stateData) storePodScheduling(podScheduling *resourcev1alpha2.PodScheduling) {
d.mutex.Lock() d.mutex.Lock()
defer d.mutex.Unlock() defer d.mutex.Unlock()
@ -196,7 +196,7 @@ func (d *stateData) storePodScheduling(podScheduling *resourcev1alpha1.PodSchedu
d.podSchedulingDirty = true d.podSchedulingDirty = true
} }
func statusForClaim(podScheduling *resourcev1alpha1.PodScheduling, podClaimName string) *resourcev1alpha1.ResourceClaimSchedulingStatus { func statusForClaim(podScheduling *resourcev1alpha2.PodScheduling, podClaimName string) *resourcev1alpha2.ResourceClaimSchedulingStatus {
for _, status := range podScheduling.Status.ResourceClaims { for _, status := range podScheduling.Status.ResourceClaims {
if status.Name == podClaimName { if status.Name == podClaimName {
return &status return &status
@ -209,9 +209,9 @@ func statusForClaim(podScheduling *resourcev1alpha1.PodScheduling, podClaimName
type dynamicResources struct { type dynamicResources struct {
enabled bool enabled bool
clientset kubernetes.Interface clientset kubernetes.Interface
claimLister resourcev1alpha1listers.ResourceClaimLister claimLister resourcev1alpha2listers.ResourceClaimLister
classLister resourcev1alpha1listers.ResourceClassLister classLister resourcev1alpha2listers.ResourceClassLister
podSchedulingLister resourcev1alpha1listers.PodSchedulingLister podSchedulingLister resourcev1alpha2listers.PodSchedulingLister
} }
// New initializes a new plugin and returns it. // New initializes a new plugin and returns it.
@ -224,9 +224,9 @@ func New(plArgs runtime.Object, fh framework.Handle, fts feature.Features) (fram
return &dynamicResources{ return &dynamicResources{
enabled: true, enabled: true,
clientset: fh.ClientSet(), clientset: fh.ClientSet(),
claimLister: fh.SharedInformerFactory().Resource().V1alpha1().ResourceClaims().Lister(), claimLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClaims().Lister(),
classLister: fh.SharedInformerFactory().Resource().V1alpha1().ResourceClasses().Lister(), classLister: fh.SharedInformerFactory().Resource().V1alpha2().ResourceClasses().Lister(),
podSchedulingLister: fh.SharedInformerFactory().Resource().V1alpha1().PodSchedulings().Lister(), podSchedulingLister: fh.SharedInformerFactory().Resource().V1alpha2().PodSchedulings().Lister(),
}, nil }, nil
} }
@ -266,8 +266,8 @@ func (pl *dynamicResources) EventsToRegister() []framework.ClusterEvent {
} }
// podResourceClaims returns the ResourceClaims for all pod.Spec.PodResourceClaims. // podResourceClaims returns the ResourceClaims for all pod.Spec.PodResourceClaims.
func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourcev1alpha1.ResourceClaim, error) { func (pl *dynamicResources) podResourceClaims(pod *v1.Pod) ([]*resourcev1alpha2.ResourceClaim, error) {
claims := make([]*resourcev1alpha1.ResourceClaim, 0, len(pod.Spec.ResourceClaims)) claims := make([]*resourcev1alpha2.ResourceClaim, 0, len(pod.Spec.ResourceClaims))
for _, resource := range pod.Spec.ResourceClaims { for _, resource := range pod.Spec.ResourceClaims {
claimName := resourceclaim.Name(pod, &resource) claimName := resourceclaim.Name(pod, &resource)
isEphemeral := resource.Source.ResourceClaimTemplateName != nil isEphemeral := resource.Source.ResourceClaimTemplateName != nil
@ -329,7 +329,7 @@ func (pl *dynamicResources) PreFilter(ctx context.Context, state *framework.Cycl
s.availableOnNodes = make([]*nodeaffinity.NodeSelector, len(claims)) s.availableOnNodes = make([]*nodeaffinity.NodeSelector, len(claims))
for index, claim := range claims { for index, claim := range claims {
if claim.Spec.AllocationMode == resourcev1alpha1.AllocationModeImmediate && if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeImmediate &&
claim.Status.Allocation == nil { claim.Status.Allocation == nil {
// This will get resolved by the resource driver. // This will get resolved by the resource driver.
return nil, statusUnschedulable(logger, "unallocated immediate resourceclaim", "pod", klog.KObj(pod), "resourceclaim", klog.KObj(claim)) return nil, statusUnschedulable(logger, "unallocated immediate resourceclaim", "pod", klog.KObj(pod), "resourceclaim", klog.KObj(claim))
@ -414,7 +414,7 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState
case claim.Status.DeallocationRequested: case claim.Status.DeallocationRequested:
// We shouldn't get here. PreFilter already checked this. // We shouldn't get here. PreFilter already checked this.
return statusUnschedulable(logger, "resourceclaim must be reallocated", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim)) return statusUnschedulable(logger, "resourceclaim must be reallocated", "pod", klog.KObj(pod), "node", klog.KObj(node), "resourceclaim", klog.KObj(claim))
case claim.Spec.AllocationMode == resourcev1alpha1.AllocationModeWaitForFirstConsumer: case claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer:
// The ResourceClass might have a node filter. This is // The ResourceClass might have a node filter. This is
// useful for trimming the initial set of potential // useful for trimming the initial set of potential
// nodes before we ask the driver(s) for information // nodes before we ask the driver(s) for information
@ -468,7 +468,7 @@ func (pl *dynamicResources) Filter(ctx context.Context, cs *framework.CycleState
// delayed allocation. Claims with immediate allocation // delayed allocation. Claims with immediate allocation
// would just get allocated again for a random node, // would just get allocated again for a random node,
// which is unlikely to help the pod. // which is unlikely to help the pod.
if claim.Spec.AllocationMode == resourcev1alpha1.AllocationModeWaitForFirstConsumer { if claim.Spec.AllocationMode == resourcev1alpha2.AllocationModeWaitForFirstConsumer {
state.unavailableClaims.Insert(unavailableClaims...) state.unavailableClaims.Insert(unavailableClaims...)
} }
} }
@ -548,8 +548,8 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta
logger.V(5).Info("remembering potential nodes", "pod", klog.KObj(pod), "potentialnodes", klog.KObjSlice(nodes)) logger.V(5).Info("remembering potential nodes", "pod", klog.KObj(pod), "potentialnodes", klog.KObjSlice(nodes))
podScheduling = podScheduling.DeepCopy() podScheduling = podScheduling.DeepCopy()
numNodes := len(nodes) numNodes := len(nodes)
if numNodes > resourcev1alpha1.PodSchedulingNodeListMaxSize { if numNodes > resourcev1alpha2.PodSchedulingNodeListMaxSize {
numNodes = resourcev1alpha1.PodSchedulingNodeListMaxSize numNodes = resourcev1alpha2.PodSchedulingNodeListMaxSize
} }
podScheduling.Spec.PotentialNodes = make([]string, 0, numNodes) podScheduling.Spec.PotentialNodes = make([]string, 0, numNodes)
if numNodes == len(nodes) { if numNodes == len(nodes) {
@ -567,7 +567,7 @@ func (pl *dynamicResources) PreScore(ctx context.Context, cs *framework.CycleSta
nodeNames[node.Name] = struct{}{} nodeNames[node.Name] = struct{}{}
} }
for nodeName := range nodeNames { for nodeName := range nodeNames {
if len(podScheduling.Spec.PotentialNodes) >= resourcev1alpha1.PodSchedulingNodeListMaxSize { if len(podScheduling.Spec.PotentialNodes) >= resourcev1alpha2.PodSchedulingNodeListMaxSize {
break break
} }
podScheduling.Spec.PotentialNodes = append(podScheduling.Spec.PotentialNodes, nodeName) podScheduling.Spec.PotentialNodes = append(podScheduling.Spec.PotentialNodes, nodeName)
@ -627,13 +627,13 @@ func (pl *dynamicResources) Reserve(ctx context.Context, cs *framework.CycleStat
} }
claim := claim.DeepCopy() claim := claim.DeepCopy()
claim.Status.ReservedFor = append(claim.Status.ReservedFor, claim.Status.ReservedFor = append(claim.Status.ReservedFor,
resourcev1alpha1.ResourceClaimConsumerReference{ resourcev1alpha2.ResourceClaimConsumerReference{
Resource: "pods", Resource: "pods",
Name: pod.Name, Name: pod.Name,
UID: pod.UID, UID: pod.UID,
}) })
logger.V(5).Info("reserve", "pod", klog.KObj(pod), "node", klog.ObjectRef{Name: nodeName}, "resourceclaim", klog.KObj(claim)) logger.V(5).Info("reserve", "pod", klog.KObj(pod), "node", klog.ObjectRef{Name: nodeName}, "resourceclaim", klog.KObj(claim))
_, err := pl.clientset.ResourceV1alpha1().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{}) _, err := pl.clientset.ResourceV1alpha2().ResourceClaims(claim.Namespace).UpdateStatus(ctx, claim, metav1.UpdateOptions{})
// TODO: metric for update errors. // TODO: metric for update errors.
if err != nil { if err != nil {
return statusError(logger, err) return statusError(logger, err)
@ -727,7 +727,7 @@ func (pl *dynamicResources) Unreserve(ctx context.Context, cs *framework.CycleSt
resourceclaim.IsReservedForPod(pod, claim) { resourceclaim.IsReservedForPod(pod, claim) {
// Remove pod from ReservedFor. // Remove pod from ReservedFor.
claim := claim.DeepCopy() claim := claim.DeepCopy()
reservedFor := make([]resourcev1alpha1.ResourceClaimConsumerReference, 0, len(claim.Status.ReservedFor)-1) reservedFor := make([]resourcev1alpha2.ResourceClaimConsumerReference, 0, len(claim.Status.ReservedFor)-1)
for _, reserved := range claim.Status.ReservedFor { for _, reserved := range claim.Status.ReservedFor {
// TODO: can UID be assumed to be unique all resources or do we also need to compare Group/Version/Resource? // TODO: can UID be assumed to be unique all resources or do we also need to compare Group/Version/Resource?
if reserved.UID != pod.UID { if reserved.UID != pod.UID {
@ -767,7 +767,7 @@ func (pl *dynamicResources) PostBind(ctx context.Context, cs *framework.CycleSta
// have it in our informer cache yet. Let's try to delete, just to be // have it in our informer cache yet. Let's try to delete, just to be
// on the safe side. // on the safe side.
logger := klog.FromContext(ctx) logger := klog.FromContext(ctx)
err = pl.clientset.ResourceV1alpha1().PodSchedulings(pod.Namespace).Delete(ctx, pod.Name, metav1.DeleteOptions{}) err = pl.clientset.ResourceV1alpha2().PodSchedulings(pod.Namespace).Delete(ctx, pod.Name, metav1.DeleteOptions{})
switch { switch {
case apierrors.IsNotFound(err): case apierrors.IsNotFound(err):
logger.V(5).Info("no PodScheduling object to delete") logger.V(5).Info("no PodScheduling object to delete")

View File

@ -29,7 +29,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
apiruntime "k8s.io/apimachinery/pkg/runtime" apiruntime "k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
@ -57,7 +57,7 @@ var (
className = "my-resource-class" className = "my-resource-class"
namespace = "default" namespace = "default"
resourceClass = &resourcev1alpha1.ResourceClass{ resourceClass = &resourcev1alpha2.ResourceClass{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: className, Name: className,
}, },
@ -90,34 +90,34 @@ var (
ResourceClassName(className). ResourceClassName(className).
Obj() Obj()
pendingImmediateClaim = st.FromResourceClaim(claim). pendingImmediateClaim = st.FromResourceClaim(claim).
AllocationMode(resourcev1alpha1.AllocationModeImmediate). AllocationMode(resourcev1alpha2.AllocationModeImmediate).
Obj() Obj()
pendingDelayedClaim = st.FromResourceClaim(claim). pendingDelayedClaim = st.FromResourceClaim(claim).
AllocationMode(resourcev1alpha1.AllocationModeWaitForFirstConsumer). AllocationMode(resourcev1alpha2.AllocationModeWaitForFirstConsumer).
Obj() Obj()
pendingDelayedClaim2 = st.FromResourceClaim(pendingDelayedClaim). pendingDelayedClaim2 = st.FromResourceClaim(pendingDelayedClaim).
Name(claimName2). Name(claimName2).
Obj() Obj()
deallocatingClaim = st.FromResourceClaim(pendingImmediateClaim). deallocatingClaim = st.FromResourceClaim(pendingImmediateClaim).
Allocation(&resourcev1alpha1.AllocationResult{}). Allocation(&resourcev1alpha2.AllocationResult{}).
DeallocationRequested(true). DeallocationRequested(true).
Obj() Obj()
inUseClaim = st.FromResourceClaim(pendingImmediateClaim). inUseClaim = st.FromResourceClaim(pendingImmediateClaim).
Allocation(&resourcev1alpha1.AllocationResult{}). Allocation(&resourcev1alpha2.AllocationResult{}).
ReservedFor(resourcev1alpha1.ResourceClaimConsumerReference{UID: types.UID(podUID)}). ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{UID: types.UID(podUID)}).
Obj() Obj()
allocatedClaim = st.FromResourceClaim(pendingDelayedClaim). allocatedClaim = st.FromResourceClaim(pendingDelayedClaim).
OwnerReference(podName, podUID, podKind). OwnerReference(podName, podUID, podKind).
Allocation(&resourcev1alpha1.AllocationResult{}). Allocation(&resourcev1alpha2.AllocationResult{}).
Obj() Obj()
allocatedDelayedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaim). allocatedDelayedClaimWithWrongTopology = st.FromResourceClaim(allocatedClaim).
Allocation(&resourcev1alpha1.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}). Allocation(&resourcev1alpha2.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("no-such-label", []string{"no-such-value"}).Obj()}).
Obj() Obj()
allocatedImmediateClaimWithWrongTopology = st.FromResourceClaim(allocatedDelayedClaimWithWrongTopology). allocatedImmediateClaimWithWrongTopology = st.FromResourceClaim(allocatedDelayedClaimWithWrongTopology).
AllocationMode(resourcev1alpha1.AllocationModeImmediate). AllocationMode(resourcev1alpha2.AllocationModeImmediate).
Obj() Obj()
allocatedClaimWithGoodTopology = st.FromResourceClaim(allocatedClaim). allocatedClaimWithGoodTopology = st.FromResourceClaim(allocatedClaim).
Allocation(&resourcev1alpha1.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("nodename", []string{"worker"}).Obj()}). Allocation(&resourcev1alpha2.AllocationResult{AvailableOnNodes: st.MakeNodeSelector().In("nodename", []string{"worker"}).Obj()}).
Obj() Obj()
otherClaim = st.MakeResourceClaim(). otherClaim = st.MakeResourceClaim().
Name("not-my-claim"). Name("not-my-claim").
@ -135,8 +135,8 @@ var (
SelectedNode(workerNode.Name). SelectedNode(workerNode.Name).
Obj() Obj()
schedulingInfo = st.FromPodScheduling(schedulingPotential). schedulingInfo = st.FromPodScheduling(schedulingPotential).
ResourceClaims(resourcev1alpha1.ResourceClaimSchedulingStatus{Name: resourceName}, ResourceClaims(resourcev1alpha2.ResourceClaimSchedulingStatus{Name: resourceName},
resourcev1alpha1.ResourceClaimSchedulingStatus{Name: resourceName2}). resourcev1alpha2.ResourceClaimSchedulingStatus{Name: resourceName2}).
Obj() Obj()
) )
@ -160,8 +160,8 @@ type result struct {
// functions will get called for all objects of that type. If they needs to // functions will get called for all objects of that type. If they needs to
// make changes only to a particular instance, then it must check the name. // make changes only to a particular instance, then it must check the name.
type change struct { type change struct {
scheduling func(*resourcev1alpha1.PodScheduling) *resourcev1alpha1.PodScheduling scheduling func(*resourcev1alpha2.PodScheduling) *resourcev1alpha2.PodScheduling
claim func(*resourcev1alpha1.ResourceClaim) *resourcev1alpha1.ResourceClaim claim func(*resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim
} }
type perNodeResult map[string]result type perNodeResult map[string]result
@ -201,9 +201,9 @@ func TestPlugin(t *testing.T) {
testcases := map[string]struct { testcases := map[string]struct {
nodes []*v1.Node // default if unset is workerNode nodes []*v1.Node // default if unset is workerNode
pod *v1.Pod pod *v1.Pod
claims []*resourcev1alpha1.ResourceClaim claims []*resourcev1alpha2.ResourceClaim
classes []*resourcev1alpha1.ResourceClass classes []*resourcev1alpha2.ResourceClass
schedulings []*resourcev1alpha1.PodScheduling schedulings []*resourcev1alpha2.PodScheduling
prepare prepare prepare prepare
want want want want
@ -213,11 +213,11 @@ func TestPlugin(t *testing.T) {
}, },
"claim-reference": { "claim-reference": {
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{allocatedClaim, otherClaim}, claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim, otherClaim},
}, },
"claim-template": { "claim-template": {
pod: podWithClaimTemplate, pod: podWithClaimTemplate,
claims: []*resourcev1alpha1.ResourceClaim{allocatedClaim, otherClaim}, claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim, otherClaim},
}, },
"missing-claim": { "missing-claim": {
pod: podWithClaimTemplate, pod: podWithClaimTemplate,
@ -232,7 +232,7 @@ func TestPlugin(t *testing.T) {
}, },
"waiting-for-immediate-allocation": { "waiting-for-immediate-allocation": {
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{pendingImmediateClaim}, claims: []*resourcev1alpha2.ResourceClaim{pendingImmediateClaim},
want: want{ want: want{
prefilter: result{ prefilter: result{
status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `unallocated immediate resourceclaim`), status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `unallocated immediate resourceclaim`),
@ -244,7 +244,7 @@ func TestPlugin(t *testing.T) {
}, },
"waiting-for-deallocation": { "waiting-for-deallocation": {
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{deallocatingClaim}, claims: []*resourcev1alpha2.ResourceClaim{deallocatingClaim},
want: want{ want: want{
prefilter: result{ prefilter: result{
status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim must be reallocated`), status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `resourceclaim must be reallocated`),
@ -256,7 +256,7 @@ func TestPlugin(t *testing.T) {
}, },
"delayed-allocation-missing-class": { "delayed-allocation-missing-class": {
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{pendingDelayedClaim}, claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim},
want: want{ want: want{
filter: perNodeResult{ filter: perNodeResult{
workerNode.Name: { workerNode.Name: {
@ -272,8 +272,8 @@ func TestPlugin(t *testing.T) {
// Create the PodScheduling object, ask for information // Create the PodScheduling object, ask for information
// and select a node. // and select a node.
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{pendingDelayedClaim}, claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim},
classes: []*resourcev1alpha1.ResourceClass{resourceClass}, classes: []*resourcev1alpha2.ResourceClass{resourceClass},
want: want{ want: want{
reserve: result{ reserve: result{
status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `waiting for resource driver to allocate resource`), status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `waiting for resource driver to allocate resource`),
@ -286,8 +286,8 @@ func TestPlugin(t *testing.T) {
// information, but do not select a node because // information, but do not select a node because
// there are multiple claims. // there are multiple claims.
pod: podWithTwoClaimNames, pod: podWithTwoClaimNames,
claims: []*resourcev1alpha1.ResourceClaim{pendingDelayedClaim, pendingDelayedClaim2}, claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim, pendingDelayedClaim2},
classes: []*resourcev1alpha1.ResourceClass{resourceClass}, classes: []*resourcev1alpha2.ResourceClass{resourceClass},
want: want{ want: want{
reserve: result{ reserve: result{
status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `waiting for resource driver to provide information`), status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `waiting for resource driver to provide information`),
@ -299,14 +299,14 @@ func TestPlugin(t *testing.T) {
// Use the populated PodScheduling object to select a // Use the populated PodScheduling object to select a
// node. // node.
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{pendingDelayedClaim}, claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim},
schedulings: []*resourcev1alpha1.PodScheduling{schedulingInfo}, schedulings: []*resourcev1alpha2.PodScheduling{schedulingInfo},
classes: []*resourcev1alpha1.ResourceClass{resourceClass}, classes: []*resourcev1alpha2.ResourceClass{resourceClass},
want: want{ want: want{
reserve: result{ reserve: result{
status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `waiting for resource driver to allocate resource`), status: framework.NewStatus(framework.UnschedulableAndUnresolvable, `waiting for resource driver to allocate resource`),
changes: change{ changes: change{
scheduling: func(in *resourcev1alpha1.PodScheduling) *resourcev1alpha1.PodScheduling { scheduling: func(in *resourcev1alpha2.PodScheduling) *resourcev1alpha2.PodScheduling {
return st.FromPodScheduling(in). return st.FromPodScheduling(in).
SelectedNode(workerNode.Name). SelectedNode(workerNode.Name).
Obj() Obj()
@ -319,12 +319,12 @@ func TestPlugin(t *testing.T) {
// Use the populated PodScheduling object to select a // Use the populated PodScheduling object to select a
// node. // node.
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{pendingDelayedClaim}, claims: []*resourcev1alpha2.ResourceClaim{pendingDelayedClaim},
schedulings: []*resourcev1alpha1.PodScheduling{schedulingInfo}, schedulings: []*resourcev1alpha2.PodScheduling{schedulingInfo},
classes: []*resourcev1alpha1.ResourceClass{resourceClass}, classes: []*resourcev1alpha2.ResourceClass{resourceClass},
prepare: prepare{ prepare: prepare{
reserve: change{ reserve: change{
scheduling: func(in *resourcev1alpha1.PodScheduling) *resourcev1alpha1.PodScheduling { scheduling: func(in *resourcev1alpha2.PodScheduling) *resourcev1alpha2.PodScheduling {
// This does not actually conflict with setting the // This does not actually conflict with setting the
// selected node, but because the plugin is not using // selected node, but because the plugin is not using
// patching yet, Update nonetheless fails. // patching yet, Update nonetheless fails.
@ -343,15 +343,15 @@ func TestPlugin(t *testing.T) {
"delayed-allocation-scheduling-completed": { "delayed-allocation-scheduling-completed": {
// Remove PodScheduling object once the pod is scheduled. // Remove PodScheduling object once the pod is scheduled.
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{allocatedClaim}, claims: []*resourcev1alpha2.ResourceClaim{allocatedClaim},
schedulings: []*resourcev1alpha1.PodScheduling{schedulingInfo}, schedulings: []*resourcev1alpha2.PodScheduling{schedulingInfo},
classes: []*resourcev1alpha1.ResourceClass{resourceClass}, classes: []*resourcev1alpha2.ResourceClass{resourceClass},
want: want{ want: want{
reserve: result{ reserve: result{
changes: change{ changes: change{
claim: func(in *resourcev1alpha1.ResourceClaim) *resourcev1alpha1.ResourceClaim { claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim {
return st.FromResourceClaim(in). return st.FromResourceClaim(in).
ReservedFor(resourcev1alpha1.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}).
Obj() Obj()
}, },
}, },
@ -364,9 +364,9 @@ func TestPlugin(t *testing.T) {
"in-use-by-other": { "in-use-by-other": {
nodes: []*v1.Node{}, nodes: []*v1.Node{},
pod: otherPodWithClaimName, pod: otherPodWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{inUseClaim}, claims: []*resourcev1alpha2.ResourceClaim{inUseClaim},
classes: []*resourcev1alpha1.ResourceClass{}, classes: []*resourcev1alpha2.ResourceClass{},
schedulings: []*resourcev1alpha1.PodScheduling{}, schedulings: []*resourcev1alpha2.PodScheduling{},
prepare: prepare{}, prepare: prepare{},
want: want{ want: want{
prefilter: result{ prefilter: result{
@ -381,7 +381,7 @@ func TestPlugin(t *testing.T) {
// PostFilter tries to get the pod scheduleable by // PostFilter tries to get the pod scheduleable by
// deallocating the claim. // deallocating the claim.
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{allocatedDelayedClaimWithWrongTopology}, claims: []*resourcev1alpha2.ResourceClaim{allocatedDelayedClaimWithWrongTopology},
want: want{ want: want{
filter: perNodeResult{ filter: perNodeResult{
workerNode.Name: { workerNode.Name: {
@ -391,7 +391,7 @@ func TestPlugin(t *testing.T) {
postfilter: result{ postfilter: result{
// Claims with delayed allocation get deallocated. // Claims with delayed allocation get deallocated.
changes: change{ changes: change{
claim: func(in *resourcev1alpha1.ResourceClaim) *resourcev1alpha1.ResourceClaim { claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim {
return st.FromResourceClaim(in). return st.FromResourceClaim(in).
DeallocationRequested(true). DeallocationRequested(true).
Obj() Obj()
@ -404,7 +404,7 @@ func TestPlugin(t *testing.T) {
// PostFilter tries to get the pod scheduleable by // PostFilter tries to get the pod scheduleable by
// deallocating the claim. // deallocating the claim.
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{allocatedImmediateClaimWithWrongTopology}, claims: []*resourcev1alpha2.ResourceClaim{allocatedImmediateClaimWithWrongTopology},
want: want{ want: want{
filter: perNodeResult{ filter: perNodeResult{
workerNode.Name: { workerNode.Name: {
@ -420,13 +420,13 @@ func TestPlugin(t *testing.T) {
}, },
"good-topology": { "good-topology": {
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{allocatedClaimWithGoodTopology}, claims: []*resourcev1alpha2.ResourceClaim{allocatedClaimWithGoodTopology},
want: want{ want: want{
reserve: result{ reserve: result{
changes: change{ changes: change{
claim: func(in *resourcev1alpha1.ResourceClaim) *resourcev1alpha1.ResourceClaim { claim: func(in *resourcev1alpha2.ResourceClaim) *resourcev1alpha2.ResourceClaim {
return st.FromResourceClaim(in). return st.FromResourceClaim(in).
ReservedFor(resourcev1alpha1.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}). ReservedFor(resourcev1alpha2.ResourceClaimConsumerReference{Resource: "pods", Name: podName, UID: types.UID(podUID)}).
Obj() Obj()
}, },
}, },
@ -435,7 +435,7 @@ func TestPlugin(t *testing.T) {
}, },
"reserved-okay": { "reserved-okay": {
pod: podWithClaimName, pod: podWithClaimName,
claims: []*resourcev1alpha1.ResourceClaim{inUseClaim}, claims: []*resourcev1alpha2.ResourceClaim{inUseClaim},
}, },
} }
@ -586,12 +586,12 @@ func stripObjects(objects []metav1.Object) {
func (tc *testContext) listAll(t *testing.T) (objects []metav1.Object) { func (tc *testContext) listAll(t *testing.T) (objects []metav1.Object) {
t.Helper() t.Helper()
claims, err := tc.client.ResourceV1alpha1().ResourceClaims("").List(tc.ctx, metav1.ListOptions{}) claims, err := tc.client.ResourceV1alpha2().ResourceClaims("").List(tc.ctx, metav1.ListOptions{})
require.NoError(t, err, "list claims") require.NoError(t, err, "list claims")
for _, claim := range claims.Items { for _, claim := range claims.Items {
objects = append(objects, &claim) objects = append(objects, &claim)
} }
schedulings, err := tc.client.ResourceV1alpha1().PodSchedulings("").List(tc.ctx, metav1.ListOptions{}) schedulings, err := tc.client.ResourceV1alpha2().PodSchedulings("").List(tc.ctx, metav1.ListOptions{})
require.NoError(t, err, "list pod scheduling") require.NoError(t, err, "list pod scheduling")
for _, scheduling := range schedulings.Items { for _, scheduling := range schedulings.Items {
objects = append(objects, &scheduling) objects = append(objects, &scheduling)
@ -609,14 +609,14 @@ func (tc *testContext) updateAPIServer(t *testing.T, objects []metav1.Object, up
if diff := cmp.Diff(objects[i], obj); diff != "" { if diff := cmp.Diff(objects[i], obj); diff != "" {
t.Logf("Updating %T %q, diff (-old, +new):\n%s", obj, obj.GetName(), diff) t.Logf("Updating %T %q, diff (-old, +new):\n%s", obj, obj.GetName(), diff)
switch obj := obj.(type) { switch obj := obj.(type) {
case *resourcev1alpha1.ResourceClaim: case *resourcev1alpha2.ResourceClaim:
obj, err := tc.client.ResourceV1alpha1().ResourceClaims(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{}) obj, err := tc.client.ResourceV1alpha2().ResourceClaims(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{})
if err != nil { if err != nil {
t.Fatalf("unexpected error during prepare update: %v", err) t.Fatalf("unexpected error during prepare update: %v", err)
} }
modified[i] = obj modified[i] = obj
case *resourcev1alpha1.PodScheduling: case *resourcev1alpha2.PodScheduling:
obj, err := tc.client.ResourceV1alpha1().PodSchedulings(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{}) obj, err := tc.client.ResourceV1alpha2().PodSchedulings(obj.Namespace).Update(tc.ctx, obj, metav1.UpdateOptions{})
if err != nil { if err != nil {
t.Fatalf("unexpected error during prepare update: %v", err) t.Fatalf("unexpected error during prepare update: %v", err)
} }
@ -646,11 +646,11 @@ func update(t *testing.T, objects []metav1.Object, updates change) []metav1.Obje
for _, obj := range objects { for _, obj := range objects {
switch in := obj.(type) { switch in := obj.(type) {
case *resourcev1alpha1.ResourceClaim: case *resourcev1alpha2.ResourceClaim:
if updates.claim != nil { if updates.claim != nil {
obj = updates.claim(in) obj = updates.claim(in)
} }
case *resourcev1alpha1.PodScheduling: case *resourcev1alpha2.PodScheduling:
if updates.scheduling != nil { if updates.scheduling != nil {
obj = updates.scheduling(in) obj = updates.scheduling(in)
} }
@ -661,7 +661,7 @@ func update(t *testing.T, objects []metav1.Object, updates change) []metav1.Obje
return updated return updated
} }
func setup(t *testing.T, nodes []*v1.Node, claims []*resourcev1alpha1.ResourceClaim, classes []*resourcev1alpha1.ResourceClass, schedulings []*resourcev1alpha1.PodScheduling) (result *testContext) { func setup(t *testing.T, nodes []*v1.Node, claims []*resourcev1alpha2.ResourceClaim, classes []*resourcev1alpha2.ResourceClass, schedulings []*resourcev1alpha2.PodScheduling) (result *testContext) {
t.Helper() t.Helper()
tc := &testContext{} tc := &testContext{}
@ -694,15 +694,15 @@ func setup(t *testing.T, nodes []*v1.Node, claims []*resourcev1alpha1.ResourceCl
// The tests use the API to create the objects because then reactors // The tests use the API to create the objects because then reactors
// get triggered. // get triggered.
for _, claim := range claims { for _, claim := range claims {
_, err := tc.client.ResourceV1alpha1().ResourceClaims(claim.Namespace).Create(tc.ctx, claim, metav1.CreateOptions{}) _, err := tc.client.ResourceV1alpha2().ResourceClaims(claim.Namespace).Create(tc.ctx, claim, metav1.CreateOptions{})
require.NoError(t, err, "create resource claim") require.NoError(t, err, "create resource claim")
} }
for _, class := range classes { for _, class := range classes {
_, err := tc.client.ResourceV1alpha1().ResourceClasses().Create(tc.ctx, class, metav1.CreateOptions{}) _, err := tc.client.ResourceV1alpha2().ResourceClasses().Create(tc.ctx, class, metav1.CreateOptions{})
require.NoError(t, err, "create resource class") require.NoError(t, err, "create resource class")
} }
for _, scheduling := range schedulings { for _, scheduling := range schedulings {
_, err := tc.client.ResourceV1alpha1().PodSchedulings(scheduling.Namespace).Create(tc.ctx, scheduling, metav1.CreateOptions{}) _, err := tc.client.ResourceV1alpha2().PodSchedulings(scheduling.Namespace).Create(tc.ctx, scheduling, metav1.CreateOptions{})
require.NoError(t, err, "create pod scheduling") require.NoError(t, err, "create pod scheduling")
} }

View File

@ -20,7 +20,7 @@ import (
"fmt" "fmt"
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
"k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/runtime/schema"
@ -846,20 +846,20 @@ func (p *PersistentVolumeWrapper) HostPathVolumeSource(src *v1.HostPathVolumeSou
} }
// ResourceClaimWrapper wraps a ResourceClaim inside. // ResourceClaimWrapper wraps a ResourceClaim inside.
type ResourceClaimWrapper struct{ resourcev1alpha1.ResourceClaim } type ResourceClaimWrapper struct{ resourcev1alpha2.ResourceClaim }
// MakeResourceClaim creates a ResourceClaim wrapper. // MakeResourceClaim creates a ResourceClaim wrapper.
func MakeResourceClaim() *ResourceClaimWrapper { func MakeResourceClaim() *ResourceClaimWrapper {
return &ResourceClaimWrapper{resourcev1alpha1.ResourceClaim{}} return &ResourceClaimWrapper{resourcev1alpha2.ResourceClaim{}}
} }
// FromResourceClaim creates a ResourceClaim wrapper from some existing object. // FromResourceClaim creates a ResourceClaim wrapper from some existing object.
func FromResourceClaim(other *resourcev1alpha1.ResourceClaim) *ResourceClaimWrapper { func FromResourceClaim(other *resourcev1alpha2.ResourceClaim) *ResourceClaimWrapper {
return &ResourceClaimWrapper{*other.DeepCopy()} return &ResourceClaimWrapper{*other.DeepCopy()}
} }
// Obj returns the inner ResourceClaim. // Obj returns the inner ResourceClaim.
func (wrapper *ResourceClaimWrapper) Obj() *resourcev1alpha1.ResourceClaim { func (wrapper *ResourceClaimWrapper) Obj() *resourcev1alpha2.ResourceClaim {
return &wrapper.ResourceClaim return &wrapper.ResourceClaim
} }
@ -896,7 +896,7 @@ func (wrapper *ResourceClaimWrapper) OwnerReference(name, uid string, gvk schema
} }
// AllocationMode sets the allocation mode of the inner object. // AllocationMode sets the allocation mode of the inner object.
func (wrapper *ResourceClaimWrapper) AllocationMode(a resourcev1alpha1.AllocationMode) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) AllocationMode(a resourcev1alpha2.AllocationMode) *ResourceClaimWrapper {
wrapper.ResourceClaim.Spec.AllocationMode = a wrapper.ResourceClaim.Spec.AllocationMode = a
return wrapper return wrapper
} }
@ -908,7 +908,7 @@ func (wrapper *ResourceClaimWrapper) ResourceClassName(name string) *ResourceCla
} }
// Allocation sets the allocation of the inner object. // Allocation sets the allocation of the inner object.
func (wrapper *ResourceClaimWrapper) Allocation(allocation *resourcev1alpha1.AllocationResult) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) Allocation(allocation *resourcev1alpha2.AllocationResult) *ResourceClaimWrapper {
wrapper.ResourceClaim.Status.Allocation = allocation wrapper.ResourceClaim.Status.Allocation = allocation
return wrapper return wrapper
} }
@ -920,26 +920,26 @@ func (wrapper *ResourceClaimWrapper) DeallocationRequested(deallocationRequested
} }
// ReservedFor sets that field of the inner object. // ReservedFor sets that field of the inner object.
func (wrapper *ResourceClaimWrapper) ReservedFor(consumers ...resourcev1alpha1.ResourceClaimConsumerReference) *ResourceClaimWrapper { func (wrapper *ResourceClaimWrapper) ReservedFor(consumers ...resourcev1alpha2.ResourceClaimConsumerReference) *ResourceClaimWrapper {
wrapper.ResourceClaim.Status.ReservedFor = consumers wrapper.ResourceClaim.Status.ReservedFor = consumers
return wrapper return wrapper
} }
// PodSchedulingWrapper wraps a PodScheduling inside. // PodSchedulingWrapper wraps a PodScheduling inside.
type PodSchedulingWrapper struct{ resourcev1alpha1.PodScheduling } type PodSchedulingWrapper struct{ resourcev1alpha2.PodScheduling }
// MakePodScheduling creates a PodScheduling wrapper. // MakePodScheduling creates a PodScheduling wrapper.
func MakePodScheduling() *PodSchedulingWrapper { func MakePodScheduling() *PodSchedulingWrapper {
return &PodSchedulingWrapper{resourcev1alpha1.PodScheduling{}} return &PodSchedulingWrapper{resourcev1alpha2.PodScheduling{}}
} }
// FromPodScheduling creates a PodScheduling wrapper from some existing object. // FromPodScheduling creates a PodScheduling wrapper from some existing object.
func FromPodScheduling(other *resourcev1alpha1.PodScheduling) *PodSchedulingWrapper { func FromPodScheduling(other *resourcev1alpha2.PodScheduling) *PodSchedulingWrapper {
return &PodSchedulingWrapper{*other.DeepCopy()} return &PodSchedulingWrapper{*other.DeepCopy()}
} }
// Obj returns the inner object. // Obj returns the inner object.
func (wrapper *PodSchedulingWrapper) Obj() *resourcev1alpha1.PodScheduling { func (wrapper *PodSchedulingWrapper) Obj() *resourcev1alpha2.PodScheduling {
return &wrapper.PodScheduling return &wrapper.PodScheduling
} }
@ -997,7 +997,7 @@ func (wrapper *PodSchedulingWrapper) PotentialNodes(nodes ...string) *PodSchedul
} }
// ResourceClaims sets that field of the inner object. // ResourceClaims sets that field of the inner object.
func (wrapper *PodSchedulingWrapper) ResourceClaims(statuses ...resourcev1alpha1.ResourceClaimSchedulingStatus) *PodSchedulingWrapper { func (wrapper *PodSchedulingWrapper) ResourceClaims(statuses ...resourcev1alpha2.ResourceClaimSchedulingStatus) *PodSchedulingWrapper {
wrapper.Status.ResourceClaims = statuses wrapper.Status.ResourceClaims = statuses
return wrapper return wrapper
} }

View File

@ -20,5 +20,5 @@ limitations under the License.
// +groupName=resource.k8s.io // +groupName=resource.k8s.io
// Package v1alpha1 is the v1alpha1 version of the resource API. // Package v1alpha2 is the v1alpha2 version of the resource API.
package v1alpha1 // import "k8s.io/api/resource/v1alpha1" package v1alpha2 // import "k8s.io/api/resource/v1alpha2"

View File

@ -15,9 +15,9 @@ limitations under the License.
*/ */
// Code generated by protoc-gen-gogo. DO NOT EDIT. // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha1/generated.proto // source: k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha2/generated.proto
package v1alpha1 package v1alpha2
import ( import (
fmt "fmt" fmt "fmt"
@ -49,7 +49,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func (m *AllocationResult) Reset() { *m = AllocationResult{} } func (m *AllocationResult) Reset() { *m = AllocationResult{} }
func (*AllocationResult) ProtoMessage() {} func (*AllocationResult) ProtoMessage() {}
func (*AllocationResult) Descriptor() ([]byte, []int) { func (*AllocationResult) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{0} return fileDescriptor_3add37bbd52889e0, []int{0}
} }
func (m *AllocationResult) XXX_Unmarshal(b []byte) error { func (m *AllocationResult) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -77,7 +77,7 @@ var xxx_messageInfo_AllocationResult proto.InternalMessageInfo
func (m *PodScheduling) Reset() { *m = PodScheduling{} } func (m *PodScheduling) Reset() { *m = PodScheduling{} }
func (*PodScheduling) ProtoMessage() {} func (*PodScheduling) ProtoMessage() {}
func (*PodScheduling) Descriptor() ([]byte, []int) { func (*PodScheduling) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{1} return fileDescriptor_3add37bbd52889e0, []int{1}
} }
func (m *PodScheduling) XXX_Unmarshal(b []byte) error { func (m *PodScheduling) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -105,7 +105,7 @@ var xxx_messageInfo_PodScheduling proto.InternalMessageInfo
func (m *PodSchedulingList) Reset() { *m = PodSchedulingList{} } func (m *PodSchedulingList) Reset() { *m = PodSchedulingList{} }
func (*PodSchedulingList) ProtoMessage() {} func (*PodSchedulingList) ProtoMessage() {}
func (*PodSchedulingList) Descriptor() ([]byte, []int) { func (*PodSchedulingList) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{2} return fileDescriptor_3add37bbd52889e0, []int{2}
} }
func (m *PodSchedulingList) XXX_Unmarshal(b []byte) error { func (m *PodSchedulingList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -133,7 +133,7 @@ var xxx_messageInfo_PodSchedulingList proto.InternalMessageInfo
func (m *PodSchedulingSpec) Reset() { *m = PodSchedulingSpec{} } func (m *PodSchedulingSpec) Reset() { *m = PodSchedulingSpec{} }
func (*PodSchedulingSpec) ProtoMessage() {} func (*PodSchedulingSpec) ProtoMessage() {}
func (*PodSchedulingSpec) Descriptor() ([]byte, []int) { func (*PodSchedulingSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{3} return fileDescriptor_3add37bbd52889e0, []int{3}
} }
func (m *PodSchedulingSpec) XXX_Unmarshal(b []byte) error { func (m *PodSchedulingSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -161,7 +161,7 @@ var xxx_messageInfo_PodSchedulingSpec proto.InternalMessageInfo
func (m *PodSchedulingStatus) Reset() { *m = PodSchedulingStatus{} } func (m *PodSchedulingStatus) Reset() { *m = PodSchedulingStatus{} }
func (*PodSchedulingStatus) ProtoMessage() {} func (*PodSchedulingStatus) ProtoMessage() {}
func (*PodSchedulingStatus) Descriptor() ([]byte, []int) { func (*PodSchedulingStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{4} return fileDescriptor_3add37bbd52889e0, []int{4}
} }
func (m *PodSchedulingStatus) XXX_Unmarshal(b []byte) error { func (m *PodSchedulingStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -189,7 +189,7 @@ var xxx_messageInfo_PodSchedulingStatus proto.InternalMessageInfo
func (m *ResourceClaim) Reset() { *m = ResourceClaim{} } func (m *ResourceClaim) Reset() { *m = ResourceClaim{} }
func (*ResourceClaim) ProtoMessage() {} func (*ResourceClaim) ProtoMessage() {}
func (*ResourceClaim) Descriptor() ([]byte, []int) { func (*ResourceClaim) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{5} return fileDescriptor_3add37bbd52889e0, []int{5}
} }
func (m *ResourceClaim) XXX_Unmarshal(b []byte) error { func (m *ResourceClaim) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -217,7 +217,7 @@ var xxx_messageInfo_ResourceClaim proto.InternalMessageInfo
func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} } func (m *ResourceClaimConsumerReference) Reset() { *m = ResourceClaimConsumerReference{} }
func (*ResourceClaimConsumerReference) ProtoMessage() {} func (*ResourceClaimConsumerReference) ProtoMessage() {}
func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) { func (*ResourceClaimConsumerReference) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{6} return fileDescriptor_3add37bbd52889e0, []int{6}
} }
func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimConsumerReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -245,7 +245,7 @@ var xxx_messageInfo_ResourceClaimConsumerReference proto.InternalMessageInfo
func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} } func (m *ResourceClaimList) Reset() { *m = ResourceClaimList{} }
func (*ResourceClaimList) ProtoMessage() {} func (*ResourceClaimList) ProtoMessage() {}
func (*ResourceClaimList) Descriptor() ([]byte, []int) { func (*ResourceClaimList) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{7} return fileDescriptor_3add37bbd52889e0, []int{7}
} }
func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -273,7 +273,7 @@ var xxx_messageInfo_ResourceClaimList proto.InternalMessageInfo
func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} } func (m *ResourceClaimParametersReference) Reset() { *m = ResourceClaimParametersReference{} }
func (*ResourceClaimParametersReference) ProtoMessage() {} func (*ResourceClaimParametersReference) ProtoMessage() {}
func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) { func (*ResourceClaimParametersReference) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{8} return fileDescriptor_3add37bbd52889e0, []int{8}
} }
func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimParametersReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -301,7 +301,7 @@ var xxx_messageInfo_ResourceClaimParametersReference proto.InternalMessageInfo
func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} } func (m *ResourceClaimSchedulingStatus) Reset() { *m = ResourceClaimSchedulingStatus{} }
func (*ResourceClaimSchedulingStatus) ProtoMessage() {} func (*ResourceClaimSchedulingStatus) ProtoMessage() {}
func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) { func (*ResourceClaimSchedulingStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{9} return fileDescriptor_3add37bbd52889e0, []int{9}
} }
func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimSchedulingStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -329,7 +329,7 @@ var xxx_messageInfo_ResourceClaimSchedulingStatus proto.InternalMessageInfo
func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} } func (m *ResourceClaimSpec) Reset() { *m = ResourceClaimSpec{} }
func (*ResourceClaimSpec) ProtoMessage() {} func (*ResourceClaimSpec) ProtoMessage() {}
func (*ResourceClaimSpec) Descriptor() ([]byte, []int) { func (*ResourceClaimSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{10} return fileDescriptor_3add37bbd52889e0, []int{10}
} }
func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -357,7 +357,7 @@ var xxx_messageInfo_ResourceClaimSpec proto.InternalMessageInfo
func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} } func (m *ResourceClaimStatus) Reset() { *m = ResourceClaimStatus{} }
func (*ResourceClaimStatus) ProtoMessage() {} func (*ResourceClaimStatus) ProtoMessage() {}
func (*ResourceClaimStatus) Descriptor() ([]byte, []int) { func (*ResourceClaimStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{11} return fileDescriptor_3add37bbd52889e0, []int{11}
} }
func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimStatus) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -385,7 +385,7 @@ var xxx_messageInfo_ResourceClaimStatus proto.InternalMessageInfo
func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} } func (m *ResourceClaimTemplate) Reset() { *m = ResourceClaimTemplate{} }
func (*ResourceClaimTemplate) ProtoMessage() {} func (*ResourceClaimTemplate) ProtoMessage() {}
func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplate) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{12} return fileDescriptor_3add37bbd52889e0, []int{12}
} }
func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplate) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -413,7 +413,7 @@ var xxx_messageInfo_ResourceClaimTemplate proto.InternalMessageInfo
func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} } func (m *ResourceClaimTemplateList) Reset() { *m = ResourceClaimTemplateList{} }
func (*ResourceClaimTemplateList) ProtoMessage() {} func (*ResourceClaimTemplateList) ProtoMessage() {}
func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplateList) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{13} return fileDescriptor_3add37bbd52889e0, []int{13}
} }
func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplateList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -441,7 +441,7 @@ var xxx_messageInfo_ResourceClaimTemplateList proto.InternalMessageInfo
func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} } func (m *ResourceClaimTemplateSpec) Reset() { *m = ResourceClaimTemplateSpec{} }
func (*ResourceClaimTemplateSpec) ProtoMessage() {} func (*ResourceClaimTemplateSpec) ProtoMessage() {}
func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) { func (*ResourceClaimTemplateSpec) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{14} return fileDescriptor_3add37bbd52889e0, []int{14}
} }
func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error { func (m *ResourceClaimTemplateSpec) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -469,7 +469,7 @@ var xxx_messageInfo_ResourceClaimTemplateSpec proto.InternalMessageInfo
func (m *ResourceClass) Reset() { *m = ResourceClass{} } func (m *ResourceClass) Reset() { *m = ResourceClass{} }
func (*ResourceClass) ProtoMessage() {} func (*ResourceClass) ProtoMessage() {}
func (*ResourceClass) Descriptor() ([]byte, []int) { func (*ResourceClass) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{15} return fileDescriptor_3add37bbd52889e0, []int{15}
} }
func (m *ResourceClass) XXX_Unmarshal(b []byte) error { func (m *ResourceClass) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -497,7 +497,7 @@ var xxx_messageInfo_ResourceClass proto.InternalMessageInfo
func (m *ResourceClassList) Reset() { *m = ResourceClassList{} } func (m *ResourceClassList) Reset() { *m = ResourceClassList{} }
func (*ResourceClassList) ProtoMessage() {} func (*ResourceClassList) ProtoMessage() {}
func (*ResourceClassList) Descriptor() ([]byte, []int) { func (*ResourceClassList) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{16} return fileDescriptor_3add37bbd52889e0, []int{16}
} }
func (m *ResourceClassList) XXX_Unmarshal(b []byte) error { func (m *ResourceClassList) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -525,7 +525,7 @@ var xxx_messageInfo_ResourceClassList proto.InternalMessageInfo
func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} } func (m *ResourceClassParametersReference) Reset() { *m = ResourceClassParametersReference{} }
func (*ResourceClassParametersReference) ProtoMessage() {} func (*ResourceClassParametersReference) ProtoMessage() {}
func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) { func (*ResourceClassParametersReference) Descriptor() ([]byte, []int) {
return fileDescriptor_a66b2ee03d862be2, []int{17} return fileDescriptor_3add37bbd52889e0, []int{17}
} }
func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error { func (m *ResourceClassParametersReference) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b) return m.Unmarshal(b)
@ -551,106 +551,106 @@ func (m *ResourceClassParametersReference) XXX_DiscardUnknown() {
var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo var xxx_messageInfo_ResourceClassParametersReference proto.InternalMessageInfo
func init() { func init() {
proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha1.AllocationResult") proto.RegisterType((*AllocationResult)(nil), "k8s.io.api.resource.v1alpha2.AllocationResult")
proto.RegisterType((*PodScheduling)(nil), "k8s.io.api.resource.v1alpha1.PodScheduling") proto.RegisterType((*PodScheduling)(nil), "k8s.io.api.resource.v1alpha2.PodScheduling")
proto.RegisterType((*PodSchedulingList)(nil), "k8s.io.api.resource.v1alpha1.PodSchedulingList") proto.RegisterType((*PodSchedulingList)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingList")
proto.RegisterType((*PodSchedulingSpec)(nil), "k8s.io.api.resource.v1alpha1.PodSchedulingSpec") proto.RegisterType((*PodSchedulingSpec)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingSpec")
proto.RegisterType((*PodSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha1.PodSchedulingStatus") proto.RegisterType((*PodSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha2.PodSchedulingStatus")
proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaim") proto.RegisterType((*ResourceClaim)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaim")
proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimConsumerReference") proto.RegisterType((*ResourceClaimConsumerReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimConsumerReference")
proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimList") proto.RegisterType((*ResourceClaimList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimList")
proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimParametersReference") proto.RegisterType((*ResourceClaimParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimParametersReference")
proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimSchedulingStatus") proto.RegisterType((*ResourceClaimSchedulingStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSchedulingStatus")
proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimSpec") proto.RegisterType((*ResourceClaimSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimSpec")
proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimStatus") proto.RegisterType((*ResourceClaimStatus)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimStatus")
proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimTemplate") proto.RegisterType((*ResourceClaimTemplate)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplate")
proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimTemplateList") proto.RegisterType((*ResourceClaimTemplateList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateList")
proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha1.ResourceClaimTemplateSpec") proto.RegisterType((*ResourceClaimTemplateSpec)(nil), "k8s.io.api.resource.v1alpha2.ResourceClaimTemplateSpec")
proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha1.ResourceClass") proto.RegisterType((*ResourceClass)(nil), "k8s.io.api.resource.v1alpha2.ResourceClass")
proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha1.ResourceClassList") proto.RegisterType((*ResourceClassList)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassList")
proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha1.ResourceClassParametersReference") proto.RegisterType((*ResourceClassParametersReference)(nil), "k8s.io.api.resource.v1alpha2.ResourceClassParametersReference")
} }
func init() { func init() {
proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha1/generated.proto", fileDescriptor_a66b2ee03d862be2) proto.RegisterFile("k8s.io/kubernetes/vendor/k8s.io/api/resource/v1alpha2/generated.proto", fileDescriptor_3add37bbd52889e0)
} }
var fileDescriptor_a66b2ee03d862be2 = []byte{ var fileDescriptor_3add37bbd52889e0 = []byte{
// 1174 bytes of a gzipped FileDescriptorProto // 1174 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x6f, 0x1b, 0x45,
0x14, 0xcf, 0xc6, 0x6e, 0x95, 0x8c, 0x1b, 0x37, 0xd9, 0x34, 0xc8, 0x8d, 0x5a, 0xdb, 0xec, 0xc9, 0x14, 0xcf, 0xc6, 0x6e, 0x95, 0x8c, 0x1b, 0x37, 0xd9, 0xb4, 0xc8, 0xad, 0x5a, 0xdb, 0xec, 0xc9,
0x12, 0xb0, 0xdb, 0x04, 0x04, 0x15, 0x1f, 0x95, 0xb2, 0x0d, 0x94, 0x08, 0x9a, 0x9a, 0x31, 0x91, 0x12, 0xb0, 0xdb, 0x18, 0x04, 0x15, 0x1f, 0x95, 0xb2, 0x0d, 0x94, 0x08, 0x9a, 0x9a, 0x31, 0x91,
0x08, 0x42, 0x88, 0xf1, 0xee, 0xab, 0xbd, 0x64, 0xbf, 0xd8, 0xd9, 0x35, 0xaa, 0xb8, 0xf4, 0xca, 0x08, 0x42, 0x88, 0xf1, 0xee, 0xab, 0xbd, 0x64, 0xbf, 0xd8, 0xd9, 0x35, 0xaa, 0xb8, 0xf4, 0xca,
0x0d, 0x21, 0xee, 0x1c, 0xf9, 0x43, 0x10, 0x52, 0x8e, 0x91, 0xe0, 0xd0, 0x93, 0x45, 0xcc, 0x81, 0x0d, 0x21, 0xee, 0x1c, 0xf9, 0x43, 0x10, 0x52, 0x8e, 0x91, 0xe0, 0xd0, 0x93, 0x45, 0xcc, 0x81,
0x3f, 0x80, 0x13, 0x3d, 0xa1, 0x19, 0xef, 0xae, 0x77, 0xd6, 0x1f, 0xc4, 0x11, 0x8a, 0xc2, 0x29, 0x3f, 0x80, 0x13, 0x3d, 0xa1, 0x19, 0xef, 0xae, 0x77, 0xd6, 0x1f, 0xc4, 0x11, 0x8a, 0xc2, 0x29,
0x99, 0x79, 0xbf, 0xf7, 0x9b, 0xf7, 0x31, 0xef, 0xcd, 0x5b, 0xa3, 0x77, 0x8f, 0xee, 0x52, 0xd5, 0x99, 0x79, 0xbf, 0xf7, 0x9b, 0xf7, 0x31, 0xef, 0xcd, 0x5b, 0xa3, 0x77, 0x0f, 0xef, 0x52, 0xd5,
0xf2, 0xb4, 0xa3, 0xa8, 0x0d, 0x81, 0x0b, 0x21, 0x50, 0xad, 0x07, 0xae, 0xe9, 0x05, 0x5a, 0x2c, 0xf2, 0xb4, 0xc3, 0xa8, 0x03, 0x81, 0x0b, 0x21, 0x50, 0xad, 0x0f, 0xae, 0xe9, 0x05, 0x5a, 0x2c,
0x20, 0xbe, 0xa5, 0x05, 0x40, 0xbd, 0x28, 0x30, 0x40, 0xeb, 0x6d, 0x11, 0xdb, 0xef, 0x92, 0x2d, 0x20, 0xbe, 0xa5, 0x05, 0x40, 0xbd, 0x28, 0x30, 0x40, 0xeb, 0x6f, 0x11, 0xdb, 0xef, 0x91, 0xa6,
0xad, 0x03, 0x2e, 0x04, 0x24, 0x04, 0x53, 0xf5, 0x03, 0x2f, 0xf4, 0xe4, 0x5b, 0x43, 0xb4, 0x4a, 0xd6, 0x05, 0x17, 0x02, 0x12, 0x82, 0xa9, 0xfa, 0x81, 0x17, 0x7a, 0xf2, 0xad, 0x11, 0x5a, 0x25,
0x7c, 0x4b, 0x4d, 0xd0, 0x6a, 0x82, 0xde, 0x7c, 0xa5, 0x63, 0x85, 0xdd, 0xa8, 0xad, 0x1a, 0x9e, 0xbe, 0xa5, 0x26, 0x68, 0x35, 0x41, 0xdf, 0x7c, 0xa5, 0x6b, 0x85, 0xbd, 0xa8, 0xa3, 0x1a, 0x9e,
0xa3, 0x75, 0xbc, 0x8e, 0xa7, 0x71, 0xa5, 0x76, 0xf4, 0x98, 0xaf, 0xf8, 0x82, 0xff, 0x37, 0x24, 0xa3, 0x75, 0xbd, 0xae, 0xa7, 0x71, 0xa5, 0x4e, 0xf4, 0x98, 0xaf, 0xf8, 0x82, 0xff, 0x37, 0x22,
0xdb, 0x54, 0x32, 0x47, 0x1b, 0x5e, 0xc0, 0x8e, 0xcd, 0x1f, 0xb8, 0xf9, 0xda, 0x08, 0xe3, 0x10, 0xbb, 0xa9, 0x64, 0x8e, 0x36, 0xbc, 0x80, 0x1d, 0x9b, 0x3f, 0xf0, 0xe6, 0x6b, 0x63, 0x8c, 0x43,
0xa3, 0x6b, 0xb9, 0x10, 0x3c, 0xd1, 0xfc, 0xa3, 0x0e, 0xdb, 0xa0, 0x9a, 0x03, 0x21, 0x99, 0xa4, 0x8c, 0x9e, 0xe5, 0x42, 0xf0, 0x44, 0xf3, 0x0f, 0xbb, 0x6c, 0x83, 0x6a, 0x0e, 0x84, 0x64, 0x9a,
0xa5, 0x4d, 0xd3, 0x0a, 0x22, 0x37, 0xb4, 0x1c, 0x18, 0x53, 0x78, 0xfd, 0xdf, 0x14, 0xa8, 0xd1, 0x96, 0x36, 0x4b, 0x2b, 0x88, 0xdc, 0xd0, 0x72, 0x60, 0x42, 0xe1, 0xf5, 0x7f, 0x53, 0xa0, 0x46,
0x05, 0x87, 0xe4, 0xf5, 0x94, 0x3f, 0x25, 0xb4, 0xba, 0x63, 0xdb, 0x9e, 0x41, 0x42, 0xcb, 0x73, 0x0f, 0x1c, 0x92, 0xd7, 0x53, 0xfe, 0x94, 0xd0, 0xfa, 0xb6, 0x6d, 0x7b, 0x06, 0x09, 0x2d, 0xcf,
0x31, 0xd0, 0xc8, 0x0e, 0xe5, 0x7b, 0xa8, 0x9c, 0xc4, 0xe6, 0x7d, 0xe2, 0x9a, 0x36, 0x54, 0xa4, 0xc5, 0x40, 0x23, 0x3b, 0x94, 0xef, 0xa1, 0x72, 0x12, 0x9b, 0xf7, 0x89, 0x6b, 0xda, 0x50, 0x91,
0xba, 0xd4, 0x58, 0xd6, 0x5f, 0x38, 0xee, 0xd7, 0x16, 0x06, 0xfd, 0x5a, 0x19, 0x0b, 0x52, 0x9c, 0xea, 0x52, 0x63, 0x55, 0x7f, 0xe1, 0x68, 0x50, 0x5b, 0x1a, 0x0e, 0x6a, 0x65, 0x2c, 0x48, 0x71,
0x43, 0xcb, 0x6d, 0xb4, 0x4a, 0x7a, 0xc4, 0xb2, 0x49, 0xdb, 0x86, 0x47, 0xee, 0xbe, 0x67, 0x02, 0x0e, 0x2d, 0x77, 0xd0, 0x3a, 0xe9, 0x13, 0xcb, 0x26, 0x1d, 0x1b, 0x1e, 0xb9, 0x7b, 0x9e, 0x09,
0xad, 0x2c, 0xd6, 0xa5, 0x46, 0x69, 0xbb, 0xae, 0x66, 0xe2, 0xcf, 0x42, 0xa6, 0xf6, 0xb6, 0x54, 0xb4, 0xb2, 0x5c, 0x97, 0x1a, 0xa5, 0x66, 0x5d, 0xcd, 0xc4, 0x9f, 0x85, 0x4c, 0xed, 0x6f, 0xa9,
0x06, 0x68, 0x81, 0x0d, 0x46, 0xe8, 0x05, 0xfa, 0x8d, 0x41, 0xbf, 0xb6, 0xba, 0x93, 0xd3, 0xc6, 0x0c, 0xd0, 0x06, 0x1b, 0x8c, 0xd0, 0x0b, 0xf4, 0x6b, 0xc3, 0x41, 0x6d, 0x7d, 0x3b, 0xa7, 0x8d,
0x63, 0x7c, 0xb2, 0x86, 0x96, 0x69, 0x97, 0x04, 0xc0, 0xf6, 0x2a, 0x85, 0xba, 0xd4, 0x58, 0xd2, 0x27, 0xf8, 0x64, 0x0d, 0xad, 0xd2, 0x1e, 0x09, 0x80, 0xed, 0x55, 0x0a, 0x75, 0xa9, 0xb1, 0xa2,
0xd7, 0x62, 0xf3, 0x96, 0x5b, 0x89, 0x00, 0x8f, 0x30, 0xca, 0x8f, 0x8b, 0x68, 0xa5, 0xe9, 0x99, 0x6f, 0xc4, 0xe6, 0xad, 0xb6, 0x13, 0x01, 0x1e, 0x63, 0x94, 0x1f, 0x97, 0xd1, 0x5a, 0xcb, 0x33,
0x2d, 0xa3, 0x0b, 0x66, 0x64, 0x5b, 0x6e, 0x47, 0xfe, 0x02, 0x2d, 0xb1, 0xf8, 0x9b, 0x24, 0x24, 0xdb, 0x46, 0x0f, 0xcc, 0xc8, 0xb6, 0xdc, 0xae, 0xfc, 0x05, 0x5a, 0x61, 0xf1, 0x37, 0x49, 0x48,
0xdc, 0xc1, 0xd2, 0xf6, 0x9d, 0x8c, 0x79, 0x69, 0x18, 0x55, 0xff, 0xa8, 0xc3, 0x36, 0xa8, 0xca, 0xb8, 0x83, 0xa5, 0xe6, 0x9d, 0x8c, 0x79, 0x69, 0x18, 0x55, 0xff, 0xb0, 0xcb, 0x36, 0xa8, 0xca,
0xd0, 0xcc, 0xe0, 0x47, 0xed, 0x2f, 0xc1, 0x08, 0x1f, 0x42, 0x48, 0x74, 0x39, 0x3e, 0x13, 0x8d, 0xd0, 0xcc, 0xe0, 0x47, 0x9d, 0x2f, 0xc1, 0x08, 0x1f, 0x42, 0x48, 0x74, 0x39, 0x3e, 0x13, 0x8d,
0xf6, 0x70, 0xca, 0x2a, 0x7f, 0x84, 0x8a, 0xd4, 0x07, 0x23, 0x76, 0x5e, 0x53, 0x67, 0x5d, 0x3e, 0xf7, 0x70, 0xca, 0x2a, 0x7f, 0x84, 0x8a, 0xd4, 0x07, 0x23, 0x76, 0x5e, 0x53, 0xe7, 0x5d, 0x3e,
0x55, 0x30, 0xae, 0xe5, 0x83, 0xa1, 0x5f, 0x8b, 0xc9, 0x8b, 0x6c, 0x85, 0x39, 0x95, 0x7c, 0x88, 0x55, 0x30, 0xae, 0xed, 0x83, 0xa1, 0x5f, 0x89, 0xc9, 0x8b, 0x6c, 0x85, 0x39, 0x95, 0x7c, 0x80,
0xae, 0xd2, 0x90, 0x84, 0x11, 0xe5, 0x4e, 0x97, 0xb6, 0xb7, 0xe6, 0x21, 0xe5, 0x8a, 0x7a, 0x39, 0x2e, 0xd3, 0x90, 0x84, 0x11, 0xe5, 0x4e, 0x97, 0x9a, 0x5b, 0x8b, 0x90, 0x72, 0x45, 0xbd, 0x1c,
0xa6, 0xbd, 0x3a, 0x5c, 0xe3, 0x98, 0x50, 0xf9, 0x59, 0x42, 0x6b, 0x02, 0xfe, 0x43, 0x8b, 0x86, 0xd3, 0x5e, 0x1e, 0xad, 0x71, 0x4c, 0xa8, 0xfc, 0x2c, 0xa1, 0x0d, 0x01, 0xff, 0xa1, 0x45, 0x43,
0xf2, 0x67, 0x63, 0x51, 0x52, 0xcf, 0x16, 0x25, 0xa6, 0xcd, 0x63, 0xb4, 0x1a, 0x9f, 0xb7, 0x94, 0xf9, 0xb3, 0x89, 0x28, 0xa9, 0xa7, 0x8b, 0x12, 0xd3, 0xe6, 0x31, 0x5a, 0x8f, 0xcf, 0x5b, 0x49,
0xec, 0x64, 0x22, 0xd4, 0x44, 0x57, 0xac, 0x10, 0x1c, 0x76, 0x3f, 0x0a, 0x8d, 0xd2, 0xf6, 0x4b, 0x76, 0x32, 0x11, 0x6a, 0xa1, 0x4b, 0x56, 0x08, 0x0e, 0xbb, 0x1f, 0x85, 0x46, 0xa9, 0xf9, 0xd2,
0x73, 0x78, 0xa3, 0xaf, 0xc4, 0xbc, 0x57, 0xf6, 0x18, 0x03, 0x1e, 0x12, 0x29, 0xdf, 0xe6, 0xbd, 0x02, 0xde, 0xe8, 0x6b, 0x31, 0xef, 0xa5, 0x5d, 0xc6, 0x80, 0x47, 0x44, 0xca, 0xb7, 0x79, 0x2f,
0x60, 0xc1, 0x93, 0xef, 0xa2, 0x6b, 0x94, 0x5f, 0x31, 0x30, 0xd9, 0xfd, 0x89, 0x2f, 0xf4, 0x8d, 0x58, 0xf0, 0xe4, 0xbb, 0xe8, 0x0a, 0xe5, 0x57, 0x0c, 0x4c, 0x76, 0x7f, 0xe2, 0x0b, 0x7d, 0x2d,
0x98, 0xe1, 0x5a, 0x2b, 0x23, 0xc3, 0x02, 0x52, 0x7e, 0x13, 0x95, 0x7d, 0x2f, 0x04, 0x37, 0xb4, 0x66, 0xb8, 0xd2, 0xce, 0xc8, 0xb0, 0x80, 0x94, 0xdf, 0x44, 0x65, 0xdf, 0x0b, 0xc1, 0x0d, 0x2d,
0x88, 0x9d, 0x5c, 0xe5, 0x42, 0x63, 0x59, 0x97, 0x59, 0x21, 0x34, 0x05, 0x09, 0xce, 0x21, 0x95, 0x62, 0x27, 0x57, 0xb9, 0xd0, 0x58, 0xd5, 0x65, 0x56, 0x08, 0x2d, 0x41, 0x82, 0x73, 0x48, 0xe5,
0xef, 0x25, 0xb4, 0x3e, 0x21, 0x03, 0xf2, 0x37, 0xa3, 0x02, 0xbb, 0x6f, 0x13, 0xcb, 0xa1, 0x15, 0x7b, 0x09, 0x6d, 0x4e, 0xc9, 0x80, 0xfc, 0xcd, 0xb8, 0xc0, 0xee, 0xdb, 0xc4, 0x72, 0x68, 0x45,
0x89, 0xbb, 0xff, 0xd6, 0x6c, 0xf7, 0x71, 0x56, 0x67, 0x2c, 0xad, 0x63, 0xd5, 0x39, 0xa4, 0xc6, 0xe2, 0xee, 0xbf, 0x35, 0xdf, 0x7d, 0x9c, 0xd5, 0x99, 0x48, 0xeb, 0x44, 0x75, 0x8e, 0xa8, 0x71,
0xb9, 0xa3, 0x78, 0x21, 0x08, 0x90, 0xcb, 0x56, 0x08, 0xa2, 0x9b, 0xff, 0x51, 0x21, 0x88, 0xa4, 0xee, 0x28, 0x5e, 0x08, 0x02, 0xe4, 0xa2, 0x15, 0x82, 0xe8, 0xe6, 0x7f, 0x54, 0x08, 0x22, 0xe9,
0xb3, 0x0b, 0x61, 0x20, 0xa1, 0xaa, 0x80, 0xbf, 0xef, 0xb9, 0x34, 0x72, 0x20, 0xc0, 0xf0, 0x18, 0xfc, 0x42, 0x18, 0x4a, 0xa8, 0x2a, 0xe0, 0xef, 0x7b, 0x2e, 0x8d, 0x1c, 0x08, 0x30, 0x3c, 0x86,
0x02, 0x70, 0x0d, 0x90, 0x5f, 0x46, 0x4b, 0xc4, 0xb7, 0x1e, 0x04, 0x5e, 0xe4, 0xc7, 0x77, 0x29, 0x00, 0x5c, 0x03, 0xe4, 0x97, 0xd1, 0x0a, 0xf1, 0xad, 0x07, 0x81, 0x17, 0xf9, 0xf1, 0x5d, 0x4a,
0xbd, 0xe5, 0x3b, 0xcd, 0x3d, 0xbe, 0x8f, 0x53, 0x04, 0x43, 0x27, 0x16, 0x71, 0x6b, 0x33, 0xe8, 0x6f, 0xf9, 0x76, 0x6b, 0x97, 0xef, 0xe3, 0x14, 0xc1, 0xd0, 0x89, 0x45, 0xdc, 0xda, 0x0c, 0x3a,
0xe4, 0x1c, 0x9c, 0x22, 0xe4, 0x3a, 0x2a, 0xba, 0xc4, 0x81, 0x4a, 0x91, 0x23, 0x53, 0xdf, 0xf7, 0x39, 0x07, 0xa7, 0x08, 0xb9, 0x8e, 0x8a, 0x2e, 0x71, 0xa0, 0x52, 0xe4, 0xc8, 0xd4, 0xf7, 0x3d,
0x89, 0x03, 0x98, 0x4b, 0x64, 0x1d, 0x15, 0x22, 0xcb, 0xac, 0x5c, 0xe1, 0x80, 0x3b, 0x31, 0xa0, 0xe2, 0x00, 0xe6, 0x12, 0x59, 0x47, 0x85, 0xc8, 0x32, 0x2b, 0x97, 0x38, 0xe0, 0x4e, 0x0c, 0x28,
0x70, 0xb0, 0xb7, 0xfb, 0xbc, 0x5f, 0x7b, 0x71, 0xda, 0x4b, 0x10, 0x3e, 0xf1, 0x81, 0xaa, 0x07, 0xec, 0xef, 0xee, 0x3c, 0x1f, 0xd4, 0x5e, 0x9c, 0xf5, 0x12, 0x84, 0x4f, 0x7c, 0xa0, 0xea, 0xfe,
0x7b, 0xbb, 0x98, 0x29, 0xf3, 0x6a, 0x17, 0x9c, 0xbc, 0x74, 0xd5, 0x2e, 0x58, 0x37, 0xa5, 0xda, 0xee, 0x0e, 0x66, 0xca, 0xbc, 0xda, 0x05, 0x27, 0x2f, 0x5c, 0xb5, 0x0b, 0xd6, 0xcd, 0xa8, 0xf6,
0x7f, 0x90, 0x50, 0x5d, 0xc0, 0x35, 0x49, 0x40, 0x1c, 0x08, 0x21, 0xa0, 0xe7, 0x4d, 0x56, 0x1d, 0x1f, 0x24, 0x54, 0x17, 0x70, 0x2d, 0x12, 0x10, 0x07, 0x42, 0x08, 0xe8, 0x59, 0x93, 0x55, 0x47,
0x15, 0x8f, 0x2c, 0xd7, 0xe4, 0x77, 0x35, 0x13, 0xfe, 0x0f, 0x2c, 0xd7, 0xc4, 0x5c, 0x92, 0x26, 0xc5, 0x43, 0xcb, 0x35, 0xf9, 0x5d, 0xcd, 0x84, 0xff, 0x03, 0xcb, 0x35, 0x31, 0x97, 0xa4, 0x09,
0xa8, 0x30, 0x2d, 0x41, 0xca, 0x53, 0x09, 0xdd, 0x9e, 0x59, 0xad, 0x29, 0x87, 0x34, 0x35, 0xc9, 0x2a, 0xcc, 0x4a, 0x90, 0xf2, 0x54, 0x42, 0xb7, 0xe7, 0x56, 0x6b, 0xca, 0x21, 0xcd, 0x4c, 0xf2,
0xef, 0xa0, 0xeb, 0x91, 0x4b, 0x23, 0x2b, 0x64, 0xcf, 0x57, 0xb6, 0xf3, 0xac, 0x0f, 0xfa, 0xb5, 0x3b, 0xe8, 0x6a, 0xe4, 0xd2, 0xc8, 0x0a, 0xd9, 0xf3, 0x95, 0xed, 0x3c, 0x9b, 0xc3, 0x41, 0xed,
0xeb, 0x07, 0xa2, 0x08, 0xe7, 0xb1, 0xca, 0x4f, 0x8b, 0xb9, 0xfc, 0xf2, 0x3e, 0xf8, 0x00, 0xad, 0xea, 0xbe, 0x28, 0xc2, 0x79, 0xac, 0xf2, 0xd3, 0x72, 0x2e, 0xbf, 0xbc, 0x0f, 0x3e, 0x40, 0x1b,
0x65, 0xda, 0x01, 0xa5, 0xfb, 0x23, 0x1b, 0x6e, 0xc6, 0x36, 0x64, 0xb5, 0x86, 0x00, 0x3c, 0xae, 0x99, 0x76, 0x40, 0xe9, 0xde, 0xd8, 0x86, 0x1b, 0xb1, 0x0d, 0x59, 0xad, 0x11, 0x00, 0x4f, 0xea,
0x23, 0x7f, 0x8d, 0x56, 0xfc, 0x6c, 0xa8, 0xe3, 0xd2, 0xbe, 0x37, 0x47, 0x4a, 0x27, 0xa4, 0x4a, 0xc8, 0x5f, 0xa3, 0x35, 0x3f, 0x1b, 0xea, 0xb8, 0xb4, 0xef, 0x2d, 0x90, 0xd2, 0x29, 0xa9, 0xd2,
0x5f, 0x1b, 0xf4, 0x6b, 0x2b, 0x82, 0x00, 0x8b, 0xe7, 0xc8, 0x4d, 0x54, 0x26, 0xe9, 0xc0, 0xf2, 0x37, 0x86, 0x83, 0xda, 0x9a, 0x20, 0xc0, 0xe2, 0x39, 0x72, 0x0b, 0x95, 0x49, 0x3a, 0xb0, 0x3c,
0x90, 0xf5, 0xf2, 0x61, 0x1a, 0x1a, 0x49, 0xfb, 0xdb, 0x11, 0xa4, 0xcf, 0xc7, 0x76, 0x70, 0x4e, 0x64, 0xbd, 0x7c, 0x94, 0x86, 0x46, 0xd2, 0xfe, 0xb6, 0x05, 0xe9, 0xf3, 0x89, 0x1d, 0x9c, 0xd3,
0x5f, 0xf9, 0x6b, 0x11, 0xad, 0x4f, 0x68, 0x0f, 0xf2, 0x36, 0x42, 0x66, 0x60, 0xf5, 0x20, 0xc8, 0x57, 0xfe, 0x5a, 0x46, 0x9b, 0x53, 0xda, 0x83, 0xdc, 0x44, 0xc8, 0x0c, 0xac, 0x3e, 0x04, 0x99,
0x04, 0x29, 0x6d, 0x73, 0xbb, 0xa9, 0x04, 0x67, 0x50, 0xf2, 0xe7, 0x08, 0x8d, 0xd8, 0xe3, 0x98, 0x20, 0xa5, 0x6d, 0x6e, 0x27, 0x95, 0xe0, 0x0c, 0x4a, 0xfe, 0x1c, 0xa1, 0x31, 0x7b, 0x1c, 0x13,
0xa8, 0xb3, 0x63, 0x92, 0x1f, 0xbf, 0xf4, 0x32, 0xe3, 0xcf, 0xec, 0x66, 0x18, 0x65, 0x8a, 0x4a, 0x75, 0x7e, 0x4c, 0xf2, 0xe3, 0x97, 0x5e, 0x66, 0xfc, 0x99, 0xdd, 0x0c, 0xa3, 0x4c, 0x51, 0x29,
0x01, 0x50, 0x08, 0x7a, 0x60, 0xbe, 0xe7, 0x05, 0x95, 0x02, 0xaf, 0xa3, 0xb7, 0xe7, 0x08, 0xfa, 0x00, 0x0a, 0x41, 0x1f, 0xcc, 0xf7, 0xbc, 0xa0, 0x52, 0xe0, 0x75, 0xf4, 0xf6, 0x02, 0x41, 0x9f,
0x58, 0x2b, 0xd3, 0xd7, 0x63, 0x97, 0x4a, 0x78, 0x44, 0x8c, 0xb3, 0xa7, 0xc8, 0x2d, 0xb4, 0x61, 0x68, 0x65, 0xfa, 0x66, 0xec, 0x52, 0x09, 0x8f, 0x89, 0x71, 0xf6, 0x14, 0xb9, 0x8d, 0xae, 0x9b,
0x02, 0xc9, 0x98, 0xf9, 0x55, 0x04, 0x34, 0x04, 0x93, 0x77, 0xa8, 0x25, 0xfd, 0x76, 0x4c, 0xb0, 0x40, 0x32, 0x66, 0x7e, 0x15, 0x01, 0x0d, 0xc1, 0xe4, 0x1d, 0x6a, 0x45, 0xbf, 0x1d, 0x13, 0x5c,
0xb1, 0x3b, 0x09, 0x84, 0x27, 0xeb, 0x2a, 0xbf, 0x49, 0x68, 0x43, 0xb0, 0xec, 0x63, 0x70, 0x7c, 0xdf, 0x99, 0x06, 0xc2, 0xd3, 0x75, 0x95, 0xdf, 0x24, 0x74, 0x5d, 0xb0, 0xec, 0x63, 0x70, 0x7c,
0x9b, 0x84, 0x70, 0x01, 0xcf, 0xd1, 0xa1, 0xf0, 0x1c, 0xbd, 0x31, 0x47, 0xf8, 0x12, 0x23, 0xa7, 0x9b, 0x84, 0x70, 0x0e, 0xcf, 0xd1, 0x81, 0xf0, 0x1c, 0xbd, 0xb1, 0x40, 0xf8, 0x12, 0x23, 0x67,
0x3d, 0x4b, 0xca, 0xaf, 0x12, 0xba, 0x39, 0x51, 0xe3, 0x02, 0xda, 0xeb, 0x27, 0x62, 0x7b, 0x7d, 0x3d, 0x4b, 0xca, 0xaf, 0x12, 0xba, 0x31, 0x55, 0xe3, 0x1c, 0xda, 0xeb, 0x27, 0x62, 0x7b, 0x7d,
0xf5, 0x1c, 0x7e, 0x4d, 0x69, 0xb3, 0x27, 0xd3, 0xbc, 0xe2, 0x4d, 0xe5, 0xff, 0x38, 0x3f, 0x28, 0xf5, 0x0c, 0x7e, 0xcd, 0x68, 0xb3, 0xc7, 0xb3, 0xbc, 0xe2, 0x4d, 0xe5, 0xff, 0x38, 0x3f, 0x28,
0x7f, 0x8b, 0x63, 0x10, 0xa5, 0x17, 0xe0, 0x86, 0xd8, 0x51, 0x16, 0xcf, 0xd4, 0x51, 0xc6, 0x1a, 0x7f, 0x8b, 0x63, 0x10, 0xa5, 0xe7, 0xe0, 0x86, 0xd8, 0x51, 0x96, 0x4f, 0xd5, 0x51, 0x26, 0x1a,
0x6d, 0x61, 0xce, 0x46, 0x4b, 0xe9, 0xf9, 0x1a, 0xed, 0x21, 0x5a, 0x11, 0x5f, 0x9f, 0xe2, 0x19, 0x6d, 0x61, 0xc1, 0x46, 0x4b, 0xe9, 0xd9, 0x1a, 0xed, 0x01, 0x5a, 0x13, 0x5f, 0x9f, 0xe2, 0x29,
0x3f, 0xe1, 0x38, 0x75, 0x4b, 0x78, 0x9d, 0x44, 0xa6, 0xfc, 0xec, 0x41, 0xe9, 0x65, 0x9e, 0x3d, 0x3f, 0xe1, 0x38, 0x75, 0x5b, 0x78, 0x9d, 0x44, 0xa6, 0xfc, 0xec, 0x41, 0xe9, 0x45, 0x9e, 0x3d,
0x28, 0x9d, 0x52, 0x14, 0xbf, 0x88, 0xb3, 0xc7, 0xc4, 0x38, 0x5f, 0xfc, 0xec, 0xc1, 0xbe, 0x8c, 0x28, 0x9d, 0x51, 0x14, 0xbf, 0x88, 0xb3, 0xc7, 0xd4, 0x38, 0x9f, 0xff, 0xec, 0xc1, 0xbe, 0x8c,
0xd9, 0x5f, 0xea, 0x13, 0x23, 0x99, 0x21, 0xd3, 0x2f, 0xe3, 0xfd, 0x44, 0x80, 0x47, 0x18, 0x5d, 0xd9, 0x5f, 0xea, 0x13, 0x23, 0x99, 0x21, 0xd3, 0x2f, 0xe3, 0xbd, 0x44, 0x80, 0xc7, 0x18, 0x5d,
0x3f, 0x3e, 0xad, 0x2e, 0x9c, 0x9c, 0x56, 0x17, 0x9e, 0x9d, 0x56, 0x17, 0x9e, 0x0e, 0xaa, 0xd2, 0x3f, 0x3a, 0xa9, 0x2e, 0x1d, 0x9f, 0x54, 0x97, 0x9e, 0x9d, 0x54, 0x97, 0x9e, 0x0e, 0xab, 0xd2,
0xf1, 0xa0, 0x2a, 0x9d, 0x0c, 0xaa, 0xd2, 0xb3, 0x41, 0x55, 0xfa, 0x7d, 0x50, 0x95, 0xbe, 0xfb, 0xd1, 0xb0, 0x2a, 0x1d, 0x0f, 0xab, 0xd2, 0xb3, 0x61, 0x55, 0xfa, 0x7d, 0x58, 0x95, 0xbe, 0xfb,
0xa3, 0xba, 0xf0, 0xe9, 0xad, 0x59, 0xbf, 0xb3, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x0a, 0xa3, 0xba, 0xf4, 0xe9, 0xad, 0x79, 0xbf, 0xb3, 0xfc, 0x13, 0x00, 0x00, 0xff, 0xff, 0x93, 0xfa,
0x8b, 0x49, 0x9f, 0x11, 0x00, 0x00, 0x8c, 0x28, 0x9f, 0x11, 0x00, 0x00,
} }
func (m *AllocationResult) Marshal() (dAtA []byte, err error) { func (m *AllocationResult) Marshal() (dAtA []byte, err error) {

View File

@ -19,7 +19,7 @@ limitations under the License.
syntax = "proto2"; syntax = "proto2";
package k8s.io.api.resource.v1alpha1; package k8s.io.api.resource.v1alpha2;
import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
@ -27,7 +27,7 @@ import "k8s.io/apimachinery/pkg/runtime/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
// Package-wide variables from generator "generated". // Package-wide variables from generator "generated".
option go_package = "k8s.io/api/resource/v1alpha1"; option go_package = "k8s.io/api/resource/v1alpha2";
// AllocationResult contains attributed of an allocated resource. // AllocationResult contains attributed of an allocated resource.
message AllocationResult { message AllocationResult {

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha1 package v1alpha2
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -26,7 +26,7 @@ import (
const GroupName = "resource.k8s.io" const GroupName = "resource.k8s.io"
// SchemeGroupVersion is group version used to register these objects // SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}
// Resource takes an unqualified resource and returns a Group qualified GroupResource // Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource { func Resource(resource string) schema.GroupResource {

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha1 package v1alpha2
import ( import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
package v1alpha1 package v1alpha2
// This file contains a collection of methods that can be used from go-restful to // This file contains a collection of methods that can be used from go-restful to
// generate Swagger API documentation for its models. Please read this PR for more // generate Swagger API documentation for its models. Please read this PR for more

View File

@ -19,7 +19,7 @@ limitations under the License.
// Code generated by deepcopy-gen. DO NOT EDIT. // Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1 "k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"

View File

@ -66,7 +66,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -129,7 +129,7 @@ var groups = []runtime.SchemeBuilder{
rbacv1alpha1.SchemeBuilder, rbacv1alpha1.SchemeBuilder,
rbacv1beta1.SchemeBuilder, rbacv1beta1.SchemeBuilder,
rbacv1.SchemeBuilder, rbacv1.SchemeBuilder,
resourcev1alpha1.SchemeBuilder, resourcev1alpha2.SchemeBuilder,
schedulingv1alpha1.SchemeBuilder, schedulingv1alpha1.SchemeBuilder,
schedulingv1beta1.SchemeBuilder, schedulingv1beta1.SchemeBuilder,
schedulingv1.SchemeBuilder, schedulingv1.SchemeBuilder,

View File

@ -1,6 +1,6 @@
{ {
"kind": "PodScheduling", "kind": "PodScheduling",
"apiVersion": "resource.k8s.io/v1alpha1", "apiVersion": "resource.k8s.io/v1alpha2",
"metadata": { "metadata": {
"name": "nameValue", "name": "nameValue",
"generateName": "generateNameValue", "generateName": "generateNameValue",

View File

@ -1,4 +1,4 @@
apiVersion: resource.k8s.io/v1alpha1 apiVersion: resource.k8s.io/v1alpha2
kind: PodScheduling kind: PodScheduling
metadata: metadata:
annotations: annotations:

View File

@ -1,6 +1,6 @@
{ {
"kind": "ResourceClaim", "kind": "ResourceClaim",
"apiVersion": "resource.k8s.io/v1alpha1", "apiVersion": "resource.k8s.io/v1alpha2",
"metadata": { "metadata": {
"name": "nameValue", "name": "nameValue",
"generateName": "generateNameValue", "generateName": "generateNameValue",

View File

@ -1,4 +1,4 @@
apiVersion: resource.k8s.io/v1alpha1 apiVersion: resource.k8s.io/v1alpha2
kind: ResourceClaim kind: ResourceClaim
metadata: metadata:
annotations: annotations:

View File

@ -1,6 +1,6 @@
{ {
"kind": "ResourceClaimTemplate", "kind": "ResourceClaimTemplate",
"apiVersion": "resource.k8s.io/v1alpha1", "apiVersion": "resource.k8s.io/v1alpha2",
"metadata": { "metadata": {
"name": "nameValue", "name": "nameValue",
"generateName": "generateNameValue", "generateName": "generateNameValue",

View File

@ -1,4 +1,4 @@
apiVersion: resource.k8s.io/v1alpha1 apiVersion: resource.k8s.io/v1alpha2
kind: ResourceClaimTemplate kind: ResourceClaimTemplate
metadata: metadata:
annotations: annotations:

View File

@ -1,6 +1,6 @@
{ {
"kind": "ResourceClass", "kind": "ResourceClass",
"apiVersion": "resource.k8s.io/v1alpha1", "apiVersion": "resource.k8s.io/v1alpha2",
"metadata": { "metadata": {
"name": "nameValue", "name": "nameValue",
"generateName": "generateNameValue", "generateName": "generateNameValue",

View File

@ -1,4 +1,4 @@
apiVersion: resource.k8s.io/v1alpha1 apiVersion: resource.k8s.io/v1alpha2
driverName: driverNameValue driverName: driverNameValue
kind: ResourceClass kind: ResourceClass
metadata: metadata:

View File

@ -1,6 +1,6 @@
{ {
"kind": "Status", "kind": "Status",
"apiVersion": "resource.k8s.io/v1alpha1", "apiVersion": "resource.k8s.io/v1alpha2",
"metadata": { "metadata": {
"selfLink": "selfLinkValue", "selfLink": "selfLinkValue",
"resourceVersion": "resourceVersionValue", "resourceVersion": "resourceVersionValue",

View File

@ -1,4 +1,4 @@
apiVersion: resource.k8s.io/v1alpha1 apiVersion: resource.k8s.io/v1alpha2
code: 6 code: 6
details: details:
causes: causes:

View File

@ -11364,7 +11364,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: namespace - name: namespace
type: type:
scalar: string scalar: string
- name: io.k8s.api.resource.v1alpha1.AllocationResult - name: io.k8s.api.resource.v1alpha2.AllocationResult
map: map:
fields: fields:
- name: availableOnNodes - name: availableOnNodes
@ -11376,7 +11376,7 @@ var schemaYAML = typed.YAMLObject(`types:
- name: shareable - name: shareable
type: type:
scalar: boolean scalar: boolean
- name: io.k8s.api.resource.v1alpha1.PodScheduling - name: io.k8s.api.resource.v1alpha2.PodScheduling
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@ -11391,13 +11391,13 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.PodSchedulingSpec namedType: io.k8s.api.resource.v1alpha2.PodSchedulingSpec
default: {} default: {}
- name: status - name: status
type: type:
namedType: io.k8s.api.resource.v1alpha1.PodSchedulingStatus namedType: io.k8s.api.resource.v1alpha2.PodSchedulingStatus
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.PodSchedulingSpec - name: io.k8s.api.resource.v1alpha2.PodSchedulingSpec
map: map:
fields: fields:
- name: potentialNodes - name: potentialNodes
@ -11409,18 +11409,18 @@ var schemaYAML = typed.YAMLObject(`types:
- name: selectedNode - name: selectedNode
type: type:
scalar: string scalar: string
- name: io.k8s.api.resource.v1alpha1.PodSchedulingStatus - name: io.k8s.api.resource.v1alpha2.PodSchedulingStatus
map: map:
fields: fields:
- name: resourceClaims - name: resourceClaims
type: type:
list: list:
elementType: elementType:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSchedulingStatus namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus
elementRelationship: associative elementRelationship: associative
keys: keys:
- name - name
- name: io.k8s.api.resource.v1alpha1.ResourceClaim - name: io.k8s.api.resource.v1alpha2.ResourceClaim
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@ -11435,13 +11435,13 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSpec namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec
default: {} default: {}
- name: status - name: status
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimStatus namedType: io.k8s.api.resource.v1alpha2.ResourceClaimStatus
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClaimConsumerReference - name: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference
map: map:
fields: fields:
- name: apiGroup - name: apiGroup
@ -11459,7 +11459,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimParametersReference - name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference
map: map:
fields: fields:
- name: apiGroup - name: apiGroup
@ -11473,7 +11473,7 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimSchedulingStatus - name: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus
map: map:
fields: fields:
- name: name - name: name
@ -11485,7 +11485,7 @@ var schemaYAML = typed.YAMLObject(`types:
elementType: elementType:
scalar: string scalar: string
elementRelationship: associative elementRelationship: associative
- name: io.k8s.api.resource.v1alpha1.ResourceClaimSpec - name: io.k8s.api.resource.v1alpha2.ResourceClaimSpec
map: map:
fields: fields:
- name: allocationMode - name: allocationMode
@ -11493,17 +11493,17 @@ var schemaYAML = typed.YAMLObject(`types:
scalar: string scalar: string
- name: parametersRef - name: parametersRef
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimParametersReference namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference
- name: resourceClassName - name: resourceClassName
type: type:
scalar: string scalar: string
default: "" default: ""
- name: io.k8s.api.resource.v1alpha1.ResourceClaimStatus - name: io.k8s.api.resource.v1alpha2.ResourceClaimStatus
map: map:
fields: fields:
- name: allocation - name: allocation
type: type:
namedType: io.k8s.api.resource.v1alpha1.AllocationResult namedType: io.k8s.api.resource.v1alpha2.AllocationResult
- name: deallocationRequested - name: deallocationRequested
type: type:
scalar: boolean scalar: boolean
@ -11514,11 +11514,11 @@ var schemaYAML = typed.YAMLObject(`types:
type: type:
list: list:
elementType: elementType:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimConsumerReference namedType: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference
elementRelationship: associative elementRelationship: associative
keys: keys:
- uid - uid
- name: io.k8s.api.resource.v1alpha1.ResourceClaimTemplate - name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplate
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@ -11533,9 +11533,9 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimTemplateSpec namedType: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClaimTemplateSpec - name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec
map: map:
fields: fields:
- name: metadata - name: metadata
@ -11544,9 +11544,9 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: spec - name: spec
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClaimSpec namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec
default: {} default: {}
- name: io.k8s.api.resource.v1alpha1.ResourceClass - name: io.k8s.api.resource.v1alpha2.ResourceClass
map: map:
fields: fields:
- name: apiVersion - name: apiVersion
@ -11565,11 +11565,11 @@ var schemaYAML = typed.YAMLObject(`types:
default: {} default: {}
- name: parametersRef - name: parametersRef
type: type:
namedType: io.k8s.api.resource.v1alpha1.ResourceClassParametersReference namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference
- name: suitableNodes - name: suitableNodes
type: type:
namedType: io.k8s.api.core.v1.NodeSelector namedType: io.k8s.api.core.v1.NodeSelector
- name: io.k8s.api.resource.v1alpha1.ResourceClassParametersReference - name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference
map: map:
fields: fields:
- name: apiGroup - name: apiGroup

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
v1 "k8s.io/client-go/applyconfigurations/core/v1" v1 "k8s.io/client-go/applyconfigurations/core/v1"

View File

@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@ -43,7 +43,7 @@ func PodScheduling(name, namespace string) *PodSchedulingApplyConfiguration {
b.WithName(name) b.WithName(name)
b.WithNamespace(namespace) b.WithNamespace(namespace)
b.WithKind("PodScheduling") b.WithKind("PodScheduling")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@ -58,20 +58,20 @@ func PodScheduling(name, namespace string) *PodSchedulingApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) { func ExtractPodScheduling(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
return extractPodScheduling(podScheduling, fieldManager, "") return extractPodScheduling(podScheduling, fieldManager, "")
} }
// ExtractPodSchedulingStatus is the same as ExtractPodScheduling except // ExtractPodSchedulingStatus is the same as ExtractPodScheduling except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractPodSchedulingStatus(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) { func ExtractPodSchedulingStatus(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string) (*PodSchedulingApplyConfiguration, error) {
return extractPodScheduling(podScheduling, fieldManager, "status") return extractPodScheduling(podScheduling, fieldManager, "status")
} }
func extractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldManager string, subresource string) (*PodSchedulingApplyConfiguration, error) { func extractPodScheduling(podScheduling *resourcev1alpha2.PodScheduling, fieldManager string, subresource string) (*PodSchedulingApplyConfiguration, error) {
b := &PodSchedulingApplyConfiguration{} b := &PodSchedulingApplyConfiguration{}
err := managedfields.ExtractInto(podScheduling, internal.Parser().Type("io.k8s.api.resource.v1alpha1.PodScheduling"), fieldManager, b, subresource) err := managedfields.ExtractInto(podScheduling, internal.Parser().Type("io.k8s.api.resource.v1alpha2.PodScheduling"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -79,7 +79,7 @@ func extractPodScheduling(podScheduling *resourcev1alpha1.PodScheduling, fieldMa
b.WithNamespace(podScheduling.Namespace) b.WithNamespace(podScheduling.Namespace)
b.WithKind("PodScheduling") b.WithKind("PodScheduling")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// PodSchedulingSpecApplyConfiguration represents an declarative configuration of the PodSchedulingSpec type for use // PodSchedulingSpecApplyConfiguration represents an declarative configuration of the PodSchedulingSpec type for use
// with apply. // with apply.

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// PodSchedulingStatusApplyConfiguration represents an declarative configuration of the PodSchedulingStatus type for use // PodSchedulingStatusApplyConfiguration represents an declarative configuration of the PodSchedulingStatus type for use
// with apply. // with apply.

View File

@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@ -43,7 +43,7 @@ func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration {
b.WithName(name) b.WithName(name)
b.WithNamespace(namespace) b.WithNamespace(namespace)
b.WithKind("ResourceClaim") b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@ -58,20 +58,20 @@ func ResourceClaim(name, namespace string) *ResourceClaimApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { func ExtractResourceClaim(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "") return extractResourceClaim(resourceClaim, fieldManager, "")
} }
// ExtractResourceClaimStatus is the same as ExtractResourceClaim except // ExtractResourceClaimStatus is the same as ExtractResourceClaim except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) { func ExtractResourceClaimStatus(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string) (*ResourceClaimApplyConfiguration, error) {
return extractResourceClaim(resourceClaim, fieldManager, "status") return extractResourceClaim(resourceClaim, fieldManager, "status")
} }
func extractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) { func extractResourceClaim(resourceClaim *resourcev1alpha2.ResourceClaim, fieldManager string, subresource string) (*ResourceClaimApplyConfiguration, error) {
b := &ResourceClaimApplyConfiguration{} b := &ResourceClaimApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClaim"), fieldManager, b, subresource) err := managedfields.ExtractInto(resourceClaim, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaim"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -79,7 +79,7 @@ func extractResourceClaim(resourceClaim *resourcev1alpha1.ResourceClaim, fieldMa
b.WithNamespace(resourceClaim.Namespace) b.WithNamespace(resourceClaim.Namespace)
b.WithKind("ResourceClaim") b.WithKind("ResourceClaim")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClaimParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClaimParametersReference type for use // ResourceClaimParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClaimParametersReference type for use
// with apply. // with apply.

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClaimSchedulingStatusApplyConfiguration represents an declarative configuration of the ResourceClaimSchedulingStatus type for use // ResourceClaimSchedulingStatusApplyConfiguration represents an declarative configuration of the ResourceClaimSchedulingStatus type for use
// with apply. // with apply.

View File

@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
) )
// ResourceClaimSpecApplyConfiguration represents an declarative configuration of the ResourceClaimSpec type for use // ResourceClaimSpecApplyConfiguration represents an declarative configuration of the ResourceClaimSpec type for use
@ -27,7 +27,7 @@ import (
type ResourceClaimSpecApplyConfiguration struct { type ResourceClaimSpecApplyConfiguration struct {
ResourceClassName *string `json:"resourceClassName,omitempty"` ResourceClassName *string `json:"resourceClassName,omitempty"`
ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"` ParametersRef *ResourceClaimParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
AllocationMode *resourcev1alpha1.AllocationMode `json:"allocationMode,omitempty"` AllocationMode *resourcev1alpha2.AllocationMode `json:"allocationMode,omitempty"`
} }
// ResourceClaimSpecApplyConfiguration constructs an declarative configuration of the ResourceClaimSpec type for use with // ResourceClaimSpecApplyConfiguration constructs an declarative configuration of the ResourceClaimSpec type for use with
@ -55,7 +55,7 @@ func (b *ResourceClaimSpecApplyConfiguration) WithParametersRef(value *ResourceC
// WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value // WithAllocationMode sets the AllocationMode field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the AllocationMode field is set to the value of the last call. // If called multiple times, the AllocationMode field is set to the value of the last call.
func (b *ResourceClaimSpecApplyConfiguration) WithAllocationMode(value resourcev1alpha1.AllocationMode) *ResourceClaimSpecApplyConfiguration { func (b *ResourceClaimSpecApplyConfiguration) WithAllocationMode(value resourcev1alpha2.AllocationMode) *ResourceClaimSpecApplyConfiguration {
b.AllocationMode = &value b.AllocationMode = &value
return b return b
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClaimStatusApplyConfiguration represents an declarative configuration of the ResourceClaimStatus type for use // ResourceClaimStatusApplyConfiguration represents an declarative configuration of the ResourceClaimStatus type for use
// with apply. // with apply.

View File

@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@ -42,7 +42,7 @@ func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyCo
b.WithName(name) b.WithName(name)
b.WithNamespace(namespace) b.WithNamespace(namespace)
b.WithKind("ResourceClaimTemplate") b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@ -57,20 +57,20 @@ func ResourceClaimTemplate(name, namespace string) *ResourceClaimTemplateApplyCo
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { func ExtractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "") return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "")
} }
// ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except // ExtractResourceClaimTemplateStatus is the same as ExtractResourceClaimTemplate except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) { func ExtractResourceClaimTemplateStatus(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string) (*ResourceClaimTemplateApplyConfiguration, error) {
return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status") return extractResourceClaimTemplate(resourceClaimTemplate, fieldManager, "status")
} }
func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) { func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha2.ResourceClaimTemplate, fieldManager string, subresource string) (*ResourceClaimTemplateApplyConfiguration, error) {
b := &ResourceClaimTemplateApplyConfiguration{} b := &ResourceClaimTemplateApplyConfiguration{}
err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClaimTemplate"), fieldManager, b, subresource) err := managedfields.ExtractInto(resourceClaimTemplate, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClaimTemplate"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -78,7 +78,7 @@ func extractResourceClaimTemplate(resourceClaimTemplate *resourcev1alpha1.Resour
b.WithNamespace(resourceClaimTemplate.Namespace) b.WithNamespace(resourceClaimTemplate.Namespace)
b.WithKind("ResourceClaimTemplate") b.WithKind("ResourceClaimTemplate")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@ -16,10 +16,10 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types" types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields" managedfields "k8s.io/apimachinery/pkg/util/managedfields"
@ -44,7 +44,7 @@ func ResourceClass(name string) *ResourceClassApplyConfiguration {
b := &ResourceClassApplyConfiguration{} b := &ResourceClassApplyConfiguration{}
b.WithName(name) b.WithName(name)
b.WithKind("ResourceClass") b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b return b
} }
@ -59,27 +59,27 @@ func ResourceClass(name string) *ResourceClassApplyConfiguration {
// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously // Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously
// applied if another fieldManager has updated or force applied any of the previously applied fields. // applied if another fieldManager has updated or force applied any of the previously applied fields.
// Experimental! // Experimental!
func ExtractResourceClass(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { func ExtractResourceClass(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "") return extractResourceClass(resourceClass, fieldManager, "")
} }
// ExtractResourceClassStatus is the same as ExtractResourceClass except // ExtractResourceClassStatus is the same as ExtractResourceClass except
// that it extracts the status subresource applied configuration. // that it extracts the status subresource applied configuration.
// Experimental! // Experimental!
func ExtractResourceClassStatus(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) { func ExtractResourceClassStatus(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string) (*ResourceClassApplyConfiguration, error) {
return extractResourceClass(resourceClass, fieldManager, "status") return extractResourceClass(resourceClass, fieldManager, "status")
} }
func extractResourceClass(resourceClass *resourcev1alpha1.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) { func extractResourceClass(resourceClass *resourcev1alpha2.ResourceClass, fieldManager string, subresource string) (*ResourceClassApplyConfiguration, error) {
b := &ResourceClassApplyConfiguration{} b := &ResourceClassApplyConfiguration{}
err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha1.ResourceClass"), fieldManager, b, subresource) err := managedfields.ExtractInto(resourceClass, internal.Parser().Type("io.k8s.api.resource.v1alpha2.ResourceClass"), fieldManager, b, subresource)
if err != nil { if err != nil {
return nil, err return nil, err
} }
b.WithName(resourceClass.Name) b.WithName(resourceClass.Name)
b.WithKind("ResourceClass") b.WithKind("ResourceClass")
b.WithAPIVersion("resource.k8s.io/v1alpha1") b.WithAPIVersion("resource.k8s.io/v1alpha2")
return b, nil return b, nil
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by applyconfiguration-gen. DO NOT EDIT. // Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
// ResourceClassParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClassParametersReference type for use // ResourceClassParametersReferenceApplyConfiguration represents an declarative configuration of the ResourceClassParametersReference type for use
// with apply. // with apply.

View File

@ -58,7 +58,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -107,7 +107,7 @@ import (
applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1" applyconfigurationsrbacv1 "k8s.io/client-go/applyconfigurations/rbac/v1"
applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1" applyconfigurationsrbacv1alpha1 "k8s.io/client-go/applyconfigurations/rbac/v1alpha1"
applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1" applyconfigurationsrbacv1beta1 "k8s.io/client-go/applyconfigurations/rbac/v1beta1"
applyconfigurationsresourcev1alpha1 "k8s.io/client-go/applyconfigurations/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/applyconfigurations/resource/v1alpha2"
applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1" applyconfigurationsschedulingv1 "k8s.io/client-go/applyconfigurations/scheduling/v1"
applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1" applyconfigurationsschedulingv1alpha1 "k8s.io/client-go/applyconfigurations/scheduling/v1alpha1"
applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1" applyconfigurationsschedulingv1beta1 "k8s.io/client-go/applyconfigurations/scheduling/v1beta1"
@ -1448,35 +1448,35 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
case rbacv1beta1.SchemeGroupVersion.WithKind("Subject"): case rbacv1beta1.SchemeGroupVersion.WithKind("Subject"):
return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{} return &applyconfigurationsrbacv1beta1.SubjectApplyConfiguration{}
// Group=resource.k8s.io, Version=v1alpha1 // Group=resource.k8s.io, Version=v1alpha2
case resourcev1alpha1.SchemeGroupVersion.WithKind("AllocationResult"): case v1alpha2.SchemeGroupVersion.WithKind("AllocationResult"):
return &applyconfigurationsresourcev1alpha1.AllocationResultApplyConfiguration{} return &resourcev1alpha2.AllocationResultApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodScheduling"): case v1alpha2.SchemeGroupVersion.WithKind("PodScheduling"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingApplyConfiguration{} return &resourcev1alpha2.PodSchedulingApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodSchedulingSpec"): case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingSpec"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingSpecApplyConfiguration{} return &resourcev1alpha2.PodSchedulingSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("PodSchedulingStatus"): case v1alpha2.SchemeGroupVersion.WithKind("PodSchedulingStatus"):
return &applyconfigurationsresourcev1alpha1.PodSchedulingStatusApplyConfiguration{} return &resourcev1alpha2.PodSchedulingStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaim"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaim"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimApplyConfiguration{} return &resourcev1alpha2.ResourceClaimApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimConsumerReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimConsumerReferenceApplyConfiguration{} return &resourcev1alpha2.ResourceClaimConsumerReferenceApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimParametersReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimParametersReferenceApplyConfiguration{} return &resourcev1alpha2.ResourceClaimParametersReferenceApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSchedulingStatus"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimSchedulingStatusApplyConfiguration{} return &resourcev1alpha2.ResourceClaimSchedulingStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimSpec"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimSpec"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimSpecApplyConfiguration{} return &resourcev1alpha2.ResourceClaimSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimStatus"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimStatus"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimStatusApplyConfiguration{} return &resourcev1alpha2.ResourceClaimStatusApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplate"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplate"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimTemplateApplyConfiguration{} return &resourcev1alpha2.ResourceClaimTemplateApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClaimTemplateSpec"):
return &applyconfigurationsresourcev1alpha1.ResourceClaimTemplateSpecApplyConfiguration{} return &resourcev1alpha2.ResourceClaimTemplateSpecApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClass"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClass"):
return &applyconfigurationsresourcev1alpha1.ResourceClassApplyConfiguration{} return &resourcev1alpha2.ResourceClassApplyConfiguration{}
case resourcev1alpha1.SchemeGroupVersion.WithKind("ResourceClassParametersReference"): case v1alpha2.SchemeGroupVersion.WithKind("ResourceClassParametersReference"):
return &applyconfigurationsresourcev1alpha1.ResourceClassParametersReferenceApplyConfiguration{} return &resourcev1alpha2.ResourceClassParametersReferenceApplyConfiguration{}
// Group=scheduling.k8s.io, Version=v1 // Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"): case schedulingv1.SchemeGroupVersion.WithKind("PriorityClass"):

View File

@ -59,7 +59,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1" rbacv1 "k8s.io/api/rbac/v1"
rbacv1alpha1 "k8s.io/api/rbac/v1alpha1" rbacv1alpha1 "k8s.io/api/rbac/v1alpha1"
rbacv1beta1 "k8s.io/api/rbac/v1beta1" rbacv1beta1 "k8s.io/api/rbac/v1beta1"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" v1alpha2 "k8s.io/api/resource/v1alpha2"
schedulingv1 "k8s.io/api/scheduling/v1" schedulingv1 "k8s.io/api/scheduling/v1"
schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/api/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/api/scheduling/v1beta1" schedulingv1beta1 "k8s.io/api/scheduling/v1beta1"
@ -348,15 +348,15 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"): case rbacv1beta1.SchemeGroupVersion.WithResource("rolebindings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Rbac().V1beta1().RoleBindings().Informer()}, nil
// Group=resource.k8s.io, Version=v1alpha1 // Group=resource.k8s.io, Version=v1alpha2
case resourcev1alpha1.SchemeGroupVersion.WithResource("podschedulings"): case v1alpha2.SchemeGroupVersion.WithResource("podschedulings"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().PodSchedulings().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().PodSchedulings().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaims"): case v1alpha2.SchemeGroupVersion.WithResource("resourceclaims"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaims().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaims().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclaimtemplates"): case v1alpha2.SchemeGroupVersion.WithResource("resourceclaimtemplates"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClaimTemplates().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClaimTemplates().Informer()}, nil
case resourcev1alpha1.SchemeGroupVersion.WithResource("resourceclasses"): case v1alpha2.SchemeGroupVersion.WithResource("resourceclasses"):
return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha1().ResourceClasses().Informer()}, nil return &genericInformer{resource: resource.GroupResource(), informer: f.Resource().V1alpha2().ResourceClasses().Informer()}, nil
// Group=scheduling.k8s.io, Version=v1 // Group=scheduling.k8s.io, Version=v1
case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"): case schedulingv1.SchemeGroupVersion.WithResource("priorityclasses"):

View File

@ -20,13 +20,13 @@ package resource
import ( import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
v1alpha1 "k8s.io/client-go/informers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/informers/resource/v1alpha2"
) )
// Interface provides access to each of this group's versions. // Interface provides access to each of this group's versions.
type Interface interface { type Interface interface {
// V1alpha1 provides access to shared informers for resources in V1alpha1. // V1alpha2 provides access to shared informers for resources in V1alpha2.
V1alpha1() v1alpha1.Interface V1alpha2() v1alpha2.Interface
} }
type group struct { type group struct {
@ -40,7 +40,7 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions}
} }
// V1alpha1 returns a new v1alpha1.Interface. // V1alpha2 returns a new v1alpha2.Interface.
func (g *group) V1alpha1() v1alpha1.Interface { func (g *group) V1alpha2() v1alpha2.Interface {
return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions)
} }

View File

@ -16,7 +16,7 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"

View File

@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@ -36,7 +36,7 @@ import (
// PodSchedulings. // PodSchedulings.
type PodSchedulingInformer interface { type PodSchedulingInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.PodSchedulingLister Lister() v1alpha2.PodSchedulingLister
} }
type podSchedulingInformer struct { type podSchedulingInformer struct {
@ -62,16 +62,16 @@ func NewFilteredPodSchedulingInformer(client kubernetes.Interface, namespace str
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().PodSchedulings(namespace).List(context.TODO(), options) return client.ResourceV1alpha2().PodSchedulings(namespace).List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().PodSchedulings(namespace).Watch(context.TODO(), options) return client.ResourceV1alpha2().PodSchedulings(namespace).Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.PodScheduling{}, &resourcev1alpha2.PodScheduling{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@ -82,9 +82,9 @@ func (f *podSchedulingInformer) defaultInformer(client kubernetes.Interface, res
} }
func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer { func (f *podSchedulingInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.PodScheduling{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.PodScheduling{}, f.defaultInformer)
} }
func (f *podSchedulingInformer) Lister() v1alpha1.PodSchedulingLister { func (f *podSchedulingInformer) Lister() v1alpha2.PodSchedulingLister {
return v1alpha1.NewPodSchedulingLister(f.Informer().GetIndexer()) return v1alpha2.NewPodSchedulingLister(f.Informer().GetIndexer())
} }

View File

@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@ -36,7 +36,7 @@ import (
// ResourceClaims. // ResourceClaims.
type ResourceClaimInformer interface { type ResourceClaimInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClaimLister Lister() v1alpha2.ResourceClaimLister
} }
type resourceClaimInformer struct { type resourceClaimInformer struct {
@ -62,16 +62,16 @@ func NewFilteredResourceClaimInformer(client kubernetes.Interface, namespace str
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaims(namespace).List(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaims(namespace).List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaims(namespace).Watch(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaims(namespace).Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.ResourceClaim{}, &resourcev1alpha2.ResourceClaim{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@ -82,9 +82,9 @@ func (f *resourceClaimInformer) defaultInformer(client kubernetes.Interface, res
} }
func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer { func (f *resourceClaimInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaim{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.ResourceClaim{}, f.defaultInformer)
} }
func (f *resourceClaimInformer) Lister() v1alpha1.ResourceClaimLister { func (f *resourceClaimInformer) Lister() v1alpha2.ResourceClaimLister {
return v1alpha1.NewResourceClaimLister(f.Informer().GetIndexer()) return v1alpha2.NewResourceClaimLister(f.Informer().GetIndexer())
} }

View File

@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@ -36,7 +36,7 @@ import (
// ResourceClaimTemplates. // ResourceClaimTemplates.
type ResourceClaimTemplateInformer interface { type ResourceClaimTemplateInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClaimTemplateLister Lister() v1alpha2.ResourceClaimTemplateLister
} }
type resourceClaimTemplateInformer struct { type resourceClaimTemplateInformer struct {
@ -62,16 +62,16 @@ func NewFilteredResourceClaimTemplateInformer(client kubernetes.Interface, names
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).List(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClaimTemplates(namespace).Watch(context.TODO(), options) return client.ResourceV1alpha2().ResourceClaimTemplates(namespace).Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.ResourceClaimTemplate{}, &resourcev1alpha2.ResourceClaimTemplate{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@ -82,9 +82,9 @@ func (f *resourceClaimTemplateInformer) defaultInformer(client kubernetes.Interf
} }
func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer { func (f *resourceClaimTemplateInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClaimTemplate{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.ResourceClaimTemplate{}, f.defaultInformer)
} }
func (f *resourceClaimTemplateInformer) Lister() v1alpha1.ResourceClaimTemplateLister { func (f *resourceClaimTemplateInformer) Lister() v1alpha2.ResourceClaimTemplateLister {
return v1alpha1.NewResourceClaimTemplateLister(f.Informer().GetIndexer()) return v1alpha2.NewResourceClaimTemplateLister(f.Informer().GetIndexer())
} }

View File

@ -16,19 +16,19 @@ limitations under the License.
// Code generated by informer-gen. DO NOT EDIT. // Code generated by informer-gen. DO NOT EDIT.
package v1alpha1 package v1alpha2
import ( import (
"context" "context"
time "time" time "time"
resourcev1alpha1 "k8s.io/api/resource/v1alpha1" resourcev1alpha2 "k8s.io/api/resource/v1alpha2"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
watch "k8s.io/apimachinery/pkg/watch" watch "k8s.io/apimachinery/pkg/watch"
internalinterfaces "k8s.io/client-go/informers/internalinterfaces" internalinterfaces "k8s.io/client-go/informers/internalinterfaces"
kubernetes "k8s.io/client-go/kubernetes" kubernetes "k8s.io/client-go/kubernetes"
v1alpha1 "k8s.io/client-go/listers/resource/v1alpha1" v1alpha2 "k8s.io/client-go/listers/resource/v1alpha2"
cache "k8s.io/client-go/tools/cache" cache "k8s.io/client-go/tools/cache"
) )
@ -36,7 +36,7 @@ import (
// ResourceClasses. // ResourceClasses.
type ResourceClassInformer interface { type ResourceClassInformer interface {
Informer() cache.SharedIndexInformer Informer() cache.SharedIndexInformer
Lister() v1alpha1.ResourceClassLister Lister() v1alpha2.ResourceClassLister
} }
type resourceClassInformer struct { type resourceClassInformer struct {
@ -61,16 +61,16 @@ func NewFilteredResourceClassInformer(client kubernetes.Interface, resyncPeriod
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClasses().List(context.TODO(), options) return client.ResourceV1alpha2().ResourceClasses().List(context.TODO(), options)
}, },
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
if tweakListOptions != nil { if tweakListOptions != nil {
tweakListOptions(&options) tweakListOptions(&options)
} }
return client.ResourceV1alpha1().ResourceClasses().Watch(context.TODO(), options) return client.ResourceV1alpha2().ResourceClasses().Watch(context.TODO(), options)
}, },
}, },
&resourcev1alpha1.ResourceClass{}, &resourcev1alpha2.ResourceClass{},
resyncPeriod, resyncPeriod,
indexers, indexers,
) )
@ -81,9 +81,9 @@ func (f *resourceClassInformer) defaultInformer(client kubernetes.Interface, res
} }
func (f *resourceClassInformer) Informer() cache.SharedIndexInformer { func (f *resourceClassInformer) Informer() cache.SharedIndexInformer {
return f.factory.InformerFor(&resourcev1alpha1.ResourceClass{}, f.defaultInformer) return f.factory.InformerFor(&resourcev1alpha2.ResourceClass{}, f.defaultInformer)
} }
func (f *resourceClassInformer) Lister() v1alpha1.ResourceClassLister { func (f *resourceClassInformer) Lister() v1alpha2.ResourceClassLister {
return v1alpha1.NewResourceClassLister(f.Informer().GetIndexer()) return v1alpha2.NewResourceClassLister(f.Informer().GetIndexer())
} }

View File

@ -66,7 +66,7 @@ import (
rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" rbacv1 "k8s.io/client-go/kubernetes/typed/rbac/v1"
rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1" rbacv1alpha1 "k8s.io/client-go/kubernetes/typed/rbac/v1alpha1"
rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1" rbacv1beta1 "k8s.io/client-go/kubernetes/typed/rbac/v1beta1"
resourcev1alpha1 "k8s.io/client-go/kubernetes/typed/resource/v1alpha1" resourcev1alpha2 "k8s.io/client-go/kubernetes/typed/resource/v1alpha2"
schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1" schedulingv1 "k8s.io/client-go/kubernetes/typed/scheduling/v1"
schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" schedulingv1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1"
schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1" schedulingv1beta1 "k8s.io/client-go/kubernetes/typed/scheduling/v1beta1"
@ -122,7 +122,7 @@ type Interface interface {
RbacV1() rbacv1.RbacV1Interface RbacV1() rbacv1.RbacV1Interface
RbacV1beta1() rbacv1beta1.RbacV1beta1Interface RbacV1beta1() rbacv1beta1.RbacV1beta1Interface
RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface
ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface
SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface SchedulingV1alpha1() schedulingv1alpha1.SchedulingV1alpha1Interface
SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface SchedulingV1beta1() schedulingv1beta1.SchedulingV1beta1Interface
SchedulingV1() schedulingv1.SchedulingV1Interface SchedulingV1() schedulingv1.SchedulingV1Interface
@ -177,7 +177,7 @@ type Clientset struct {
rbacV1 *rbacv1.RbacV1Client rbacV1 *rbacv1.RbacV1Client
rbacV1beta1 *rbacv1beta1.RbacV1beta1Client rbacV1beta1 *rbacv1beta1.RbacV1beta1Client
rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client rbacV1alpha1 *rbacv1alpha1.RbacV1alpha1Client
resourceV1alpha1 *resourcev1alpha1.ResourceV1alpha1Client resourceV1alpha2 *resourcev1alpha2.ResourceV1alpha2Client
schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client schedulingV1alpha1 *schedulingv1alpha1.SchedulingV1alpha1Client
schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client schedulingV1beta1 *schedulingv1beta1.SchedulingV1beta1Client
schedulingV1 *schedulingv1.SchedulingV1Client schedulingV1 *schedulingv1.SchedulingV1Client
@ -401,9 +401,9 @@ func (c *Clientset) RbacV1alpha1() rbacv1alpha1.RbacV1alpha1Interface {
return c.rbacV1alpha1 return c.rbacV1alpha1
} }
// ResourceV1alpha1 retrieves the ResourceV1alpha1Client // ResourceV1alpha2 retrieves the ResourceV1alpha2Client
func (c *Clientset) ResourceV1alpha1() resourcev1alpha1.ResourceV1alpha1Interface { func (c *Clientset) ResourceV1alpha2() resourcev1alpha2.ResourceV1alpha2Interface {
return c.resourceV1alpha1 return c.resourceV1alpha2
} }
// SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client // SchedulingV1alpha1 retrieves the SchedulingV1alpha1Client
@ -652,7 +652,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset,
if err != nil { if err != nil {
return nil, err return nil, err
} }
cs.resourceV1alpha1, err = resourcev1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) cs.resourceV1alpha2, err = resourcev1alpha2.NewForConfigAndClient(&configShallowCopy, httpClient)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -744,7 +744,7 @@ func New(c rest.Interface) *Clientset {
cs.rbacV1 = rbacv1.New(c) cs.rbacV1 = rbacv1.New(c)
cs.rbacV1beta1 = rbacv1beta1.New(c) cs.rbacV1beta1 = rbacv1beta1.New(c)
cs.rbacV1alpha1 = rbacv1alpha1.New(c) cs.rbacV1alpha1 = rbacv1alpha1.New(c)
cs.resourceV1alpha1 = resourcev1alpha1.New(c) cs.resourceV1alpha2 = resourcev1alpha2.New(c)
cs.schedulingV1alpha1 = schedulingv1alpha1.New(c) cs.schedulingV1alpha1 = schedulingv1alpha1.New(c)
cs.schedulingV1beta1 = schedulingv1beta1.New(c) cs.schedulingV1beta1 = schedulingv1beta1.New(c)
cs.schedulingV1 = schedulingv1.New(c) cs.schedulingV1 = schedulingv1.New(c)

Some files were not shown because too many files have changed in this diff Show More