module

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package module is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToTag

func AppendToTag(name string, tag string) string

AppendToTag adds the specified tag to the image name cleanly, i.e. by avoiding messing up the name or getting "name:-tag"

func ImageExists

func ImageExists(
	ctx context.Context,
	client client.Client,
	reg registry.Registry,
	modSpec kmmv1beta1.ModuleSpec,
	namespace string,
	km kmmv1beta1.KernelMapping,
	imageName string) (bool, error)

func IntermediateImageName

func IntermediateImageName(name, namespace, targetImage string) string

IntermediateImageName returns the image name of the pre-signed module image name

func ShouldBeBuilt

func ShouldBeBuilt(modSpec kmmv1beta1.ModuleSpec, km kmmv1beta1.KernelMapping) bool

ShouldBeBuilt indicates whether the specified KernelMapping of the Module should be built or not.

func ShouldBeSigned

func ShouldBeSigned(modSpec kmmv1beta1.ModuleSpec, km kmmv1beta1.KernelMapping) bool

ShouldBeSigned indicates whether the specified KernelMapping of the Module should be signed or not.

Types

type KernelMapper

type KernelMapper interface {
	FindMappingForKernel(mappings []kmmv1beta1.KernelMapping, kernelVersion string) (*kmmv1beta1.KernelMapping, error)
	GetNodeOSConfig(node *v1.Node) *NodeOSConfig
	GetNodeOSConfigFromKernelVersion(kernelVersion string) *NodeOSConfig
	PrepareKernelMapping(mapping *kmmv1beta1.KernelMapping, osConfig *NodeOSConfig) (*kmmv1beta1.KernelMapping, error)
}

func NewKernelMapper

func NewKernelMapper() KernelMapper

type MockKernelMapper

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

MockKernelMapper is a mock of KernelMapper interface.

func NewMockKernelMapper

func NewMockKernelMapper(ctrl *gomock.Controller) *MockKernelMapper

NewMockKernelMapper creates a new mock instance.

func (*MockKernelMapper) EXPECT

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

func (*MockKernelMapper) FindMappingForKernel

func (m *MockKernelMapper) FindMappingForKernel(mappings []v1beta1.KernelMapping, kernelVersion string) (*v1beta1.KernelMapping, error)

FindMappingForKernel mocks base method.

func (*MockKernelMapper) GetNodeOSConfig

func (m *MockKernelMapper) GetNodeOSConfig(node *v1.Node) *NodeOSConfig

GetNodeOSConfig mocks base method.

func (*MockKernelMapper) GetNodeOSConfigFromKernelVersion

func (m *MockKernelMapper) GetNodeOSConfigFromKernelVersion(kernelVersion string) *NodeOSConfig

GetNodeOSConfigFromKernelVersion mocks base method.

func (*MockKernelMapper) PrepareKernelMapping

func (m *MockKernelMapper) PrepareKernelMapping(mapping *v1beta1.KernelMapping, osConfig *NodeOSConfig) (*v1beta1.KernelMapping, error)

PrepareKernelMapping mocks base method.

type MockKernelMapperMockRecorder

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

MockKernelMapperMockRecorder is the mock recorder for MockKernelMapper.

func (*MockKernelMapperMockRecorder) FindMappingForKernel

func (mr *MockKernelMapperMockRecorder) FindMappingForKernel(mappings, kernelVersion interface{}) *gomock.Call

FindMappingForKernel indicates an expected call of FindMappingForKernel.

func (*MockKernelMapperMockRecorder) GetNodeOSConfig

func (mr *MockKernelMapperMockRecorder) GetNodeOSConfig(node interface{}) *gomock.Call

GetNodeOSConfig indicates an expected call of GetNodeOSConfig.

func (*MockKernelMapperMockRecorder) GetNodeOSConfigFromKernelVersion

func (mr *MockKernelMapperMockRecorder) GetNodeOSConfigFromKernelVersion(kernelVersion interface{}) *gomock.Call

GetNodeOSConfigFromKernelVersion indicates an expected call of GetNodeOSConfigFromKernelVersion.

func (*MockKernelMapperMockRecorder) PrepareKernelMapping

func (mr *MockKernelMapperMockRecorder) PrepareKernelMapping(mapping, osConfig interface{}) *gomock.Call

PrepareKernelMapping indicates an expected call of PrepareKernelMapping.

type NodeOSConfig

type NodeOSConfig struct {
	KernelFullVersion  string `subst:"KERNEL_FULL_VERSION"`
	KernelVersionMMP   string `subst:"KERNEL_XYZ"`
	KernelVersionMajor string `subst:"KERNEL_X"`
	KernelVersionMinor string `subst:"KERNEL_Y"`
	KernelVersionPatch string `subst:"KERNEL_Z"`
}

Jump to

Keyboard shortcuts

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