UNPKG

kubernetes-models

Version:
35 lines (34 loc) 2.15 kB
import { IIoK8sApiResourceV1DeviceClassConfiguration } from "./DeviceClassConfiguration.js"; import { IIoK8sApiResourceV1DeviceSelector } from "./DeviceSelector.js"; import { ModelData, Model } from "@kubernetes-models/base"; /** * DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it. */ export interface IDeviceClassSpec { /** * Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. * * They are passed to the driver, but are not considered while allocating the claim. */ "config"?: Array<IIoK8sApiResourceV1DeviceClassConfiguration>; /** * ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. * * This is a beta field. */ "extendedResourceName"?: string; /** * Each selector must be satisfied by a device which is claimed via this class. */ "selectors"?: Array<IIoK8sApiResourceV1DeviceSelector>; } /** * DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it. */ export declare class DeviceClassSpec extends Model<IDeviceClassSpec> implements IDeviceClassSpec { "config"?: Array<IIoK8sApiResourceV1DeviceClassConfiguration>; "extendedResourceName"?: string; "selectors"?: Array<IIoK8sApiResourceV1DeviceSelector>; constructor(data?: ModelData<IDeviceClassSpec>); } export type { IDeviceClassSpec as IIoK8sApiResourceV1DeviceClassSpec, DeviceClassSpec as IoK8sApiResourceV1DeviceClassSpec };