Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client manages the NVIDIA GPU Device Plugin configuration in a Kubernetes cluster.
func NewClient ¶
func NewClient( k8sClient k8s.Client, configMapName string, configMapNamespace string, defaultConfigName string, ) *Client
NewClient returns a new Client.
func (*Client) CreateOrUpdateConfigMap ¶
CreateOrUpdateConfigMap creates or updates the ConfigMap for the NVIDIA GPU Device Plugin configuration.
type CommandLineFlags ¶
type CommandLineFlags struct {
MigStrategy *string `yaml:"migStrategy"`
FailOnInitError *bool `yaml:"failOnInitError,omitempty"`
MpsRoot *string `yaml:"mpsRoot,omitempty"`
NvidiaDriverRoot *string `yaml:"nvidiaDriverRoot,omitempty"`
NvidiaDevRoot *string `yaml:"nvidiaDevRoot,omitempty"`
GDSEnabled *bool `yaml:"gdsEnabled,omitempty"`
MOFEDEnabled *bool `yaml:"mofedEnabled,omitempty"`
UseNodeFeatureAPI *bool `yaml:"useNodeFeatureAPI,omitempty"`
DeviceDiscoveryStrategy *string `yaml:"deviceDiscoveryStrategy,omitempty"`
}
CommandLineFlags holds the list of command line flags used to configure the device plugin and GFD.
type Config ¶
type Config struct {
Version string `yaml:"version"`
Flags Flags `yaml:"flags,omitempty"`
Sharing Sharing `yaml:"sharing,omitempty"`
}
Config is a versioned struct used to hold configuration information.
func CreateTimeSlicingDevicePluginConfig ¶
CreateTimeSlicingDevicePluginConfig returns a v1.Config that configures the NVIDIA GPU device plugin for time slicing.
Link: https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/gpu-sharing.html
type ReplicatedDeviceRef ¶
type ReplicatedDeviceRef string
ReplicatedDeviceRef can either be a full GPU index, a MIG index, or a UUID (full GPU or MIG)
type ReplicatedDevices ¶
type ReplicatedDevices struct {
All bool
Count int
List []ReplicatedDeviceRef
}
ReplicatedDevices encapsulates the set of devices that should be replicated for a given resource. This struct should be treated as a 'union' and only one of the fields in this struct should be set at any given time.
type ReplicatedResource ¶
type ReplicatedResource struct {
Name ResourceName `yaml:"name"`
Rename ResourceName `yaml:"rename,omitempty"`
Devices ReplicatedDevices `yaml:"devices,flow,omitempty"`
Replicas int `yaml:"replicas"`
}
ReplicatedResource represents a resource to be replicated.
type ReplicatedResources ¶
type ReplicatedResources struct {
RenameByDefault bool `yaml:"renameByDefault,omitempty"`
FailRequestsGreaterThanOne bool `yaml:"failRequestsGreaterThanOne,omitempty"`
Resources []ReplicatedResource `yaml:"resources,omitempty"`
}
ReplicatedResources defines generic options for replicating devices.
type ResourceName ¶
type ResourceName string
ResourceName represents a valid resource name in Kubernetes
type Sharing ¶
type Sharing struct {
// TimeSlicing defines the set of replicas to be made for timeSlicing available resources.
TimeSlicing ReplicatedResources `yaml:"timeSlicing,omitempty"`
// MPS defines the set of replicas to be shared using MPS
MPS *ReplicatedResources `yaml:"mps,omitempty"`
}
Sharing encapsulates the set of sharing strategies that are supported.