daemonset

package
v0.0.0-...-5d8ad60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package daemonset is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyMapStringString

func CopyMapStringString(m map[string]string) map[string]string

CopyMapStringString returns a deep copy of m.

func GetDevicePluginKernelVersion

func GetDevicePluginKernelVersion() string

func GetPodPullSecrets

func GetPodPullSecrets(secret *v1.LocalObjectReference) []v1.LocalObjectReference

func IsDevicePluginKernelVersion

func IsDevicePluginKernelVersion(kernelVersion string) bool

func MakeLoadCommand

func MakeLoadCommand(spec kmmv1beta1.ModprobeSpec) []string

func MakeUnloadCommand

func MakeUnloadCommand(spec kmmv1beta1.ModprobeSpec) []string

func OverrideLabels

func OverrideLabels(labels, overrides map[string]string) map[string]string

Types

type DaemonSetCreator

type DaemonSetCreator interface {
	GarbageCollect(ctx context.Context, existingDS map[string]*appsv1.DaemonSet, validKernels sets.String) ([]string, error)
	ModuleDaemonSetsByKernelVersion(ctx context.Context, name, namespace string) (map[string]*appsv1.DaemonSet, error)
	SetDriverContainerAsDesired(ctx context.Context, ds *appsv1.DaemonSet, image string, mod kmmv1beta1.Module, kernelVersion string) error
	SetDevicePluginAsDesired(ctx context.Context, ds *appsv1.DaemonSet, mod *kmmv1beta1.Module) error
	GetNodeLabelFromPod(pod *v1.Pod, moduleName string) string
}

func NewCreator

func NewCreator(client client.Client, kernelLabel string, scheme *runtime.Scheme) DaemonSetCreator

type MockDaemonSetCreator

type MockDaemonSetCreator struct {
	// contains filtered or unexported fields
}

MockDaemonSetCreator is a mock of DaemonSetCreator interface.

func NewMockDaemonSetCreator

func NewMockDaemonSetCreator(ctrl *gomock.Controller) *MockDaemonSetCreator

NewMockDaemonSetCreator creates a new mock instance.

func (*MockDaemonSetCreator) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDaemonSetCreator) GarbageCollect

func (m *MockDaemonSetCreator) GarbageCollect(ctx context.Context, existingDS map[string]*v1.DaemonSet, validKernels sets.String) ([]string, error)

GarbageCollect mocks base method.

func (*MockDaemonSetCreator) GetNodeLabelFromPod

func (m *MockDaemonSetCreator) GetNodeLabelFromPod(pod *v10.Pod, moduleName string) string

GetNodeLabelFromPod mocks base method.

func (*MockDaemonSetCreator) ModuleDaemonSetsByKernelVersion

func (m *MockDaemonSetCreator) ModuleDaemonSetsByKernelVersion(ctx context.Context, name, namespace string) (map[string]*v1.DaemonSet, error)

ModuleDaemonSetsByKernelVersion mocks base method.

func (*MockDaemonSetCreator) SetDevicePluginAsDesired

func (m *MockDaemonSetCreator) SetDevicePluginAsDesired(ctx context.Context, ds *v1.DaemonSet, mod *v1beta1.Module) error

SetDevicePluginAsDesired mocks base method.

func (*MockDaemonSetCreator) SetDriverContainerAsDesired

func (m *MockDaemonSetCreator) SetDriverContainerAsDesired(ctx context.Context, ds *v1.DaemonSet, image string, mod v1beta1.Module, kernelVersion string) error

SetDriverContainerAsDesired mocks base method.

type MockDaemonSetCreatorMockRecorder

type MockDaemonSetCreatorMockRecorder struct {
	// contains filtered or unexported fields
}

MockDaemonSetCreatorMockRecorder is the mock recorder for MockDaemonSetCreator.

func (*MockDaemonSetCreatorMockRecorder) GarbageCollect

func (mr *MockDaemonSetCreatorMockRecorder) GarbageCollect(ctx, existingDS, validKernels interface{}) *gomock.Call

GarbageCollect indicates an expected call of GarbageCollect.

func (*MockDaemonSetCreatorMockRecorder) GetNodeLabelFromPod

func (mr *MockDaemonSetCreatorMockRecorder) GetNodeLabelFromPod(pod, moduleName interface{}) *gomock.Call

GetNodeLabelFromPod indicates an expected call of GetNodeLabelFromPod.

func (*MockDaemonSetCreatorMockRecorder) ModuleDaemonSetsByKernelVersion

func (mr *MockDaemonSetCreatorMockRecorder) ModuleDaemonSetsByKernelVersion(ctx, name, namespace interface{}) *gomock.Call

ModuleDaemonSetsByKernelVersion indicates an expected call of ModuleDaemonSetsByKernelVersion.

func (*MockDaemonSetCreatorMockRecorder) SetDevicePluginAsDesired

func (mr *MockDaemonSetCreatorMockRecorder) SetDevicePluginAsDesired(ctx, ds, mod interface{}) *gomock.Call

SetDevicePluginAsDesired indicates an expected call of SetDevicePluginAsDesired.

func (*MockDaemonSetCreatorMockRecorder) SetDriverContainerAsDesired

func (mr *MockDaemonSetCreatorMockRecorder) SetDriverContainerAsDesired(ctx, ds, image, mod, kernelVersion interface{}) *gomock.Call

SetDriverContainerAsDesired indicates an expected call of SetDriverContainerAsDesired.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL