mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
feat(dra): support dra device classes (#1759)
* feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> * feat(dra): support dra device classes Signed-off-by: Hristo Hristov <me@hhristov.info> --------- Signed-off-by: Hristo Hristov <me@hhristov.info>
This commit is contained in:
@@ -70,6 +70,8 @@ type TenantAvailableClassesStatus struct {
|
||||
RuntimeClasses []string `json:"runtime,omitempty"`
|
||||
// Available GatewayClasses
|
||||
GatewayClasses []string `json:"gateway,omitempty"`
|
||||
// Available DeviceClasses
|
||||
DeviceClasses []string `json:"device,omitempty"`
|
||||
}
|
||||
|
||||
func (ms *TenantStatus) GetInstance(stat *TenantStatusNamespaceItem) *TenantStatusNamespaceItem {
|
||||
|
||||
@@ -58,6 +58,8 @@ type TenantSpec struct {
|
||||
// A default value can be specified, and all the Pod resources created will inherit the declared class.
|
||||
// Optional.
|
||||
PriorityClasses *api.DefaultAllowedListSpec `json:"priorityClasses,omitempty"`
|
||||
// Specifies options for the DeviceClass resources.
|
||||
DeviceClasses *api.SelectorAllowedListSpec `json:"deviceClasses,omitempty"`
|
||||
// Specifies options for the GatewayClass resources.
|
||||
GatewayOptions GatewayOptions `json:"gatewayOptions,omitempty"`
|
||||
// Toggling the Tenant resources cordoning, when enable resources cannot be deleted.
|
||||
|
||||
@@ -949,6 +949,11 @@ func (in *TenantAvailableClassesStatus) DeepCopyInto(out *TenantAvailableClasses
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
if in.DeviceClasses != nil {
|
||||
in, out := &in.DeviceClasses, &out.DeviceClasses
|
||||
*out = make([]string, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TenantAvailableClassesStatus.
|
||||
@@ -1275,6 +1280,11 @@ func (in *TenantSpec) DeepCopyInto(out *TenantSpec) {
|
||||
*out = new(api.DefaultAllowedListSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.DeviceClasses != nil {
|
||||
in, out := &in.DeviceClasses, &out.DeviceClasses
|
||||
*out = new(api.SelectorAllowedListSpec)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
in.GatewayOptions.DeepCopyInto(&out.GatewayOptions)
|
||||
if in.ForceTenantPrefix != nil {
|
||||
in, out := &in.ForceTenantPrefix, &out.ForceTenantPrefix
|
||||
|
||||
Reference in New Issue
Block a user