Documentation
¶
Index ¶
- func CheckMountDeviceRequest(req *api.MountDeviceRequest) error
- func CheckPodContainer(pod *v1.Pod, cont *api.Container) (*api.Container, error)
- func CheckPodContainerStatus(pod *v1.Pod, cont *api.Container) error
- func CheckUnMountDeviceRequest(req *api.UnMountDeviceRequest) error
- func GarbageCollectionPods(kubeClient *kubernetes.Clientset, objKeys []api.ObjectKey) []api.ObjectKey
- func Owner(pod *v1.Pod, controller bool) []metav1.OwnerReference
- func WaitSupportPodsReady(ctx context.Context, podLister listerv1.PodLister, ...) ([]*v1.Pod, []*v1.Pod, error)
- type DeviceMounterServer
- func (s *DeviceMounterServer) CreateDeviceFiles(cfg *util.Config, devInfos []api.DeviceInfo) (func() error, error)
- func (s *DeviceMounterServer) CreatePodDisruptionBudget(ctx context.Context, ownerPod *v1.Pod) (*policyv1.PodDisruptionBudget, error)
- func (s *DeviceMounterServer) DeleteDeviceFiles(cfg *util.Config, devInfos []api.DeviceInfo) (func() error, error)
- func (s *DeviceMounterServer) DeviceRuleSetFunc(cgroupPath string, r *configs.Resources) (closed func() error, rollback func() error, err error)
- func (s *DeviceMounterServer) GetCGroupPath(pod *v1.Pod, container *api.Container) (string, error)
- func (s *DeviceMounterServer) GetContainerCGroupPathAndPids(pod *v1.Pod, container *api.Container) ([]int, string, error)
- func (s *DeviceMounterServer) GetSlavePods(devType string, ownerPod *v1.Pod, container *api.Container) ([]*v1.Pod, error)
- func (s *DeviceMounterServer) GetTargetPod(ctx context.Context, name, namespace string) (*v1.Pod, error)
- func (s *DeviceMounterServer) MountDevice(ctx context.Context, req *api.MountDeviceRequest) (resp *api.DeviceResponse, err error)
- func (s *DeviceMounterServer) MutationPodFunc(devType string, container *api.Container, ownerPod, mutaPod *v1.Pod)
- func (s *DeviceMounterServer) PatchPod(pod *v1.Pod, patches []string) (*v1.Pod, error)
- func (s *DeviceMounterServer) UnMountDevice(ctx context.Context, req *api.UnMountDeviceRequest) (resp *api.DeviceResponse, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMountDeviceRequest ¶
func CheckMountDeviceRequest(req *api.MountDeviceRequest) error
CheckMountDeviceRequest Check if the device request is legitimate.
func CheckPodContainer ¶
CheckPodContainer Check if the target container exists in the pod.
func CheckPodContainerStatus ¶
CheckPodContainerStatus Check if the specified container status is normal
func CheckUnMountDeviceRequest ¶
func CheckUnMountDeviceRequest(req *api.UnMountDeviceRequest) error
func GarbageCollectionPods ¶
func GarbageCollectionPods(kubeClient *kubernetes.Clientset, objKeys []api.ObjectKey) []api.ObjectKey
GarbageCollectionPods Batch delete pods
func WaitSupportPodsReady ¶
func WaitSupportPodsReady(ctx context.Context, podLister listerv1.PodLister, kubeClient *kubernetes.Clientset, deviceMounter framework.DeviceMounter, slavePodKeys []api.ObjectKey) ([]*v1.Pod, []*v1.Pod, error)
WaitSupportPodsReady Waiting for the status of the created pods to be ready.
Types ¶
type DeviceMounterServer ¶
type DeviceMounterServer struct {
api.UnimplementedDeviceMountServiceServer
// contains filtered or unexported fields
}
func NewDeviceMounterServer ¶
func NewDeviceMounterServer( nodeName string, kubeClient *kubernetes.Clientset, podLister listerv1.PodLister, nodeLister listerv1.NodeLister, recorder record.EventRecorder) *DeviceMounterServer
func (*DeviceMounterServer) CreateDeviceFiles ¶
func (s *DeviceMounterServer) CreateDeviceFiles(cfg *util.Config, devInfos []api.DeviceInfo) (func() error, error)
func (*DeviceMounterServer) CreatePodDisruptionBudget ¶
func (s *DeviceMounterServer) CreatePodDisruptionBudget(ctx context.Context, ownerPod *v1.Pod) (*policyv1.PodDisruptionBudget, error)
func (*DeviceMounterServer) DeleteDeviceFiles ¶
func (s *DeviceMounterServer) DeleteDeviceFiles(cfg *util.Config, devInfos []api.DeviceInfo) (func() error, error)
func (*DeviceMounterServer) DeviceRuleSetFunc ¶
func (*DeviceMounterServer) GetCGroupPath ¶
func (*DeviceMounterServer) GetContainerCGroupPathAndPids ¶
func (*DeviceMounterServer) GetSlavePods ¶
func (*DeviceMounterServer) GetTargetPod ¶
func (*DeviceMounterServer) MountDevice ¶
func (s *DeviceMounterServer) MountDevice(ctx context.Context, req *api.MountDeviceRequest) (resp *api.DeviceResponse, err error)
func (*DeviceMounterServer) MutationPodFunc ¶
func (*DeviceMounterServer) UnMountDevice ¶
func (s *DeviceMounterServer) UnMountDevice(ctx context.Context, req *api.UnMountDeviceRequest) (resp *api.DeviceResponse, err error)
Click to show internal directories.
Click to hide internal directories.