daemonset

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 19 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 GetPodPullSecrets

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

func IsDevicePluginDS added in v1.1.0

func IsDevicePluginDS(ds *appsv1.DaemonSet) bool

func OverrideLabels

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

Types

type DaemonSetCreator

type DaemonSetCreator interface {
	GarbageCollect(ctx context.Context, mod *kmmv1beta1.Module, existingDS []appsv1.DaemonSet, validKernels sets.Set[string]) ([]string, error)
	GetModuleDaemonSets(ctx context.Context, name, namespace string) ([]appsv1.DaemonSet, error)
	SetDriverContainerAsDesired(ctx context.Context, ds *appsv1.DaemonSet, mld *api.ModuleLoaderData) error
	SetDevicePluginAsDesired(ctx context.Context, ds *appsv1.DaemonSet, mod *kmmv1beta1.Module) error
	GetNodeLabelFromPod(pod *v1.Pod, moduleName string, useDeprecatedLabel bool) 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, mod *v1beta1.Module, existingDS []v1.DaemonSet, validKernels sets.Set[string]) ([]string, error)

GarbageCollect mocks base method.

func (*MockDaemonSetCreator) GetModuleDaemonSets added in v1.1.0

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

GetModuleDaemonSets mocks base method.

func (*MockDaemonSetCreator) GetNodeLabelFromPod

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

GetNodeLabelFromPod 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, mld *api.ModuleLoaderData) 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, mod, existingDS, validKernels interface{}) *gomock.Call

GarbageCollect indicates an expected call of GarbageCollect.

func (*MockDaemonSetCreatorMockRecorder) GetModuleDaemonSets added in v1.1.0

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

GetModuleDaemonSets indicates an expected call of GetModuleDaemonSets.

func (*MockDaemonSetCreatorMockRecorder) GetNodeLabelFromPod

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

GetNodeLabelFromPod indicates an expected call of GetNodeLabelFromPod.

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, mld 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