Documentation ¶
Index ¶
- Constants
- Variables
- func IsAlreadyExistsError() error
- func NewTestScheme() *runtime.Scheme
- func NotFoundError() error
- func RegisterTestModel()
- type MockClient
- func (m *MockClient) Create(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.CreateOption) error
- func (m *MockClient) CreateMapWithType(t interface{}) map[k8sClient.ObjectKey]k8sClient.Object
- func (m *MockClient) CreateOrUpdateObjectInMap(obj k8sClient.Object)
- func (m *MockClient) Delete(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.DeleteOption) error
- func (m *MockClient) DeleteAllOf(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.DeleteAllOfOption) error
- func (m *MockClient) Get(ctx context.Context, key types.NamespacedName, obj k8sClient.Object, ...) error
- func (m *MockClient) GetObjectFromMap(obj k8sClient.Object, key types.NamespacedName)
- func (m *MockClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
- func (m *MockClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (m *MockClient) List(ctx context.Context, list k8sClient.ObjectList, opts ...k8sClient.ListOption) error
- func (m *MockClient) Patch(ctx context.Context, obj k8sClient.Object, patch k8sClient.Patch, ...) error
- func (m *MockClient) RESTMapper() meta.RESTMapper
- func (m *MockClient) Scheme() *runtime.Scheme
- func (m *MockClient) Status() k8sClient.StatusWriter
- func (m *MockClient) SubResource(subResource string) k8sClient.SubResourceClient
- func (m *MockClient) Update(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.UpdateOption) error
- type MockStatusClient
- func (m *MockStatusClient) Create(ctx context.Context, obj k8sClient.Object, subResource k8sClient.Object, ...) error
- func (m *MockStatusClient) Patch(ctx context.Context, obj k8sClient.Object, patch k8sClient.Patch, ...) error
- func (m *MockStatusClient) Update(ctx context.Context, obj k8sClient.Object, ...) error
Constants ¶
View Source
const ( LabelKeyNvidia = "accelerator" LabelValueNvidia = "nvidia" CapacityNvidiaGPU = "nvidia.com/gpu" )
Variables ¶
View Source
var ( MockWorkspaceDistributedModel = &v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", Annotations: map[string]string{ v1alpha1.AnnotationWorkspaceRuntime: string(model.RuntimeNameHuggingfaceTransformers), }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "apps": "test", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-distributed-model", }, }, }, } MockWorkspaceWithPreferredNodes = &v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "apps": "test", }, }, PreferredNodes: []string{"node-p1", "node-p2"}, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-distributed-model", }, }, }, } MockWorkspaceCustomModel = &v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testCustomWorkspace", Namespace: "kaito", }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "apps": "test", }, }, }, Inference: &v1alpha1.InferenceSpec{ Template: &corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ { Name: "test-container", Image: "fake.kaito.com/kaito-image:0.0.1", }, }, }, }, }, } )
View Source
var ( MockWorkspaceWithPreset = &v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", Annotations: map[string]string{ v1alpha1.AnnotationWorkspaceRuntime: string(model.RuntimeNameHuggingfaceTransformers), }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "apps": "test", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model", }, }, }, } MockWorkspaceWithPresetVLLM = &v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "apps": "test", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model", }, }, }, } )
View Source
var ( MockDeploymentUpdated = appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", Annotations: map[string]string{v1alpha1.WorkspaceRevisionAnnotation: "1"}, }, Spec: appsv1.DeploymentSpec{ Replicas: &numRep, Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ "app": "test-app", }, }, Spec: corev1.PodSpec{ Containers: []corev1.Container{ { Name: "test-container", Image: "nginx:latest", Ports: []corev1.ContainerPort{ { ContainerPort: 80, Protocol: corev1.ProtocolTCP, }, }, Env: []corev1.EnvVar{ { Name: "ENV_VAR_NAME", Value: "ENV_VAR_VALUE", }, }, VolumeMounts: []corev1.VolumeMount{ { Name: "volume-name", MountPath: "/mount/path", }, }, }, }, Volumes: []corev1.Volume{ { Name: "volume-name", VolumeSource: corev1.VolumeSource{ EmptyDir: &corev1.EmptyDirVolumeSource{}, }, }, }, }, }, }, Status: appsv1.DeploymentStatus{ ReadyReplicas: 1, }, } MockDeploymentWithAnnotationsAndContainer1 = appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ { Name: "test-container", Image: "nginx:latest", }, }, }, }, }, } MockDeploymentWithAnnotationsAndContainer2 = appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Annotations: map[string]string{}, }, Spec: appsv1.DeploymentSpec{ Template: corev1.PodTemplateSpec{ Spec: corev1.PodSpec{ Containers: []corev1.Container{ { Name: "test-container2", Image: "nginx:latest", }, }, }, }, }, } )
View Source
var ( MockMachine = v1alpha5.Machine{ ObjectMeta: metav1.ObjectMeta{ Name: "testmachine", Labels: machineLabels, }, Spec: v1alpha5.MachineSpec{ MachineTemplateRef: &v1alpha5.MachineTemplateRef{ Name: "test-machine", }, Requirements: []corev1.NodeSelectorRequirement{ { Key: corev1.LabelInstanceTypeStable, Operator: corev1.NodeSelectorOpIn, Values: []string{"Standard_NC12s_v3"}, }, { Key: "karpenter.sh/provisioner-name", Operator: corev1.NodeSelectorOpIn, Values: []string{"default"}, }, }, }, } MockNodeClaim = v1beta1.NodeClaim{ ObjectMeta: metav1.ObjectMeta{ Name: "testnodeclaim", Labels: nodeClaimLabels, }, Spec: v1beta1.NodeClaimSpec{ Requirements: []v1beta1.NodeSelectorRequirementWithMinValues{ { NodeSelectorRequirement: corev1.NodeSelectorRequirement{ Key: corev1.LabelInstanceTypeStable, Operator: corev1.NodeSelectorOpIn, Values: []string{"Standard_NC12s_v3"}, }, MinValues: lo.ToPtr(1), }, }, }, } )
View Source
var ( MockMachineList = &v1alpha5.MachineList{ Items: []v1alpha5.Machine{ MockMachine, }, } MockNodeClaimList = &v1beta1.NodeClaimList{ Items: []v1beta1.NodeClaim{ MockNodeClaim, }, } )
View Source
var ( Adapters1 = []v1alpha1.AdapterSpec{ { Source: &v1alpha1.DataSource{ Name: "Adapter-1", Image: "fake.kaito.com/kaito-image:0.0.1", }, Strength: &ValidStrength, }, } Adapters2 = []v1alpha1.AdapterSpec{ { Source: &v1alpha1.DataSource{ Name: "Adapter-1", Image: "fake.kaito.com/kaito-image:0.0.1", }, Strength: &ValidStrength, }, { Source: &v1alpha1.DataSource{ Name: "Adapter-2", Image: "fake.kaito.com/kaito-image:0.0.2", }, Strength: &ValidStrength, }, } Adapters3 = []v1alpha1.AdapterSpec{ { Source: &v1alpha1.DataSource{ Name: "Adapter-2", Image: "fake.kaito.com/kaito-image:0.0.2", }, Strength: &ValidStrength, }, { Source: &v1alpha1.DataSource{ Name: "Adapter-1", Image: "fake.kaito.com/kaito-image:0.0.1", }, Strength: &ValidStrength, }, } Adapters4 = []v1alpha1.AdapterSpec{ { Source: &v1alpha1.DataSource{ Name: "Adapter-1", Image: "fake.kaito.com/kaito-image:0.0.1", }, Strength: &ValidStrength, }, { Source: &v1alpha1.DataSource{ Name: "Adapter-3", Image: "fake.kaito.com/kaito-image:0.0.3", }, Strength: &ValidStrength, }, } )
View Source
var (
MockNodeList = &corev1.NodeList{
Items: nodes,
}
)
View Source
var ( MockRAGEngine = &v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine", Namespace: "kaito", }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "ragengine.kaito.io/name": "testRAGEngine", }, }, }, Embedding: &v1alpha1.EmbeddingSpec{ Local: &v1alpha1.LocalEmbeddingSpec{ ModelID: "BAAI/bge-small-en-v1.5", }, }, }, } )
View Source
var ( MockRAGEngineDistributedModel = &v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine", Namespace: "kaito", }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "apps": "test", }, }, }, }, } )
View Source
var ( MockRAGEngineFailToCreateCR = v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine-failedtocreateCR", Namespace: "kaito", Annotations: map[string]string{ "ragengine.kaito.io/revision": "1", }, }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "ragengine.kaito.io/name": "testRAGEngine", }, }, }}, } )
View Source
var ( MockRAGEngineSuccessful = v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine-successful", Namespace: "kaito", Annotations: map[string]string{ "ragengine.kaito.io/revision": "0", }, }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "ragengine.kaito.io/name": "testRAGEngine", }, }, }}, } )
View Source
var ( MockRAGEngineWithComputeHash = v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine", Namespace: "kaito", Annotations: map[string]string{ "ragengine.kaito.io/hash": "7985249e078eb041e38c10c3637032b2d352616c609be8542a779460d3ff1d67", "ragengine.kaito.io/revision": "1", }, }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "ragengine.kaito.io/name": "testRAGEngine", }, }, }}, } )
View Source
var ( MockRAGEngineWithDeleteOldCR = v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine", Namespace: "kaito", Annotations: map[string]string{ "workspace.kaito.io/hash": "14485768c1b67a529a71e3c87d9f2e6c1ed747534dea07e268e93475a5e21e", "workspace.kaito.io/revision": "1", }, }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "ragengine.kaito.io/name": "testRAGEngine", }, }, }, Embedding: &v1alpha1.EmbeddingSpec{ Local: &v1alpha1.LocalEmbeddingSpec{ ModelID: "BAAI/bge-small-en-v1.5", }, }, }, } )
View Source
var ( MockRAGEngineWithPreset = &v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine", Namespace: "kaito", }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "ragengine.kaito.io/name": "testRAGEngine", }, }, }, Embedding: &v1alpha1.EmbeddingSpec{ Local: &v1alpha1.LocalEmbeddingSpec{ ModelID: "BAAI/bge-small-en-v1.5", }, }, InferenceService: &v1alpha1.InferenceServiceSpec{ URL: "http://localhost:5000/chat", }, }, } )
View Source
var MockRAGEngineWithPresetHash = "14485768c1b67a529a71e3c87d9f2e6c1ed747534dea07e268e93475a5e21e"
View Source
var ( MockRAGEngineWithUpdatedDeployment = v1alpha1.RAGEngine{ ObjectMeta: metav1.ObjectMeta{ Name: "testRAGEngine", Namespace: "kaito", Annotations: map[string]string{ "ragengine.kaito.io/hash": "7985249e078eb041e38c10c3637032b2d352616c609be8542a779460d3ff1d67", "ragengine.kaito.io/revision": "1", }, }, Spec: &v1alpha1.RAGEngineSpec{ Compute: &v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "ragengine.kaito.io/name": "testRAGEngine", }, }, }}, } )
View Source
var ( MockWorkspaceFailToCreateCR = v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace-failedtocreateCR", Namespace: "kaito", Annotations: map[string]string{ "workspace.kaito.io/revision": "1", }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "workspace.kaito.io/name": "testWorkspace", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model", }, }, }, } )
View Source
var ( MockWorkspaceSuccessful = v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace-successful", Namespace: "kaito", Annotations: map[string]string{ "workspace.kaito.io/revision": "0", }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "workspace.kaito.io/name": "testWorkspace", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model", }, }, }, } )
View Source
var ( MockWorkspaceUpdateCR = v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", Annotations: map[string]string{ "workspace.kaito.io/hash": "1171dc5d15043c92e684c8f06689eb241763a735181fdd2b59c8bd8fd6eecdd4", "workspace.kaito.io/revision": "1", }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "workspace.kaito.io/name": "testWorkspace", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model", }, }, }, } )
View Source
var ( MockWorkspaceWithComputeHash = v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", Annotations: map[string]string{ "workspace.kaito.io/hash": "1171dc5d15043c92e684c8f06689eb241763a735181fdd2b59c8bd8fd6eecdd4", "workspace.kaito.io/revision": "1", }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "workspace.kaito.io/name": "testWorkspace", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model", }, }, }, } )
View Source
var ( MockWorkspaceWithDeleteOldCR = v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", Annotations: map[string]string{ "workspace.kaito.io/hash": "1171dc5d15043c92e684c8f06689eb241763a735181fdd2b59c8bd8fd6eecdd4", "workspace.kaito.io/revision": "1", }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "workspace.kaito.io/name": "testWorkspace", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model-DeleteOldCR", }, }, }, } )
View Source
var ( MockWorkspaceWithInferenceTemplate = &v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "apps": "test", }, }, }, Inference: &v1alpha1.InferenceSpec{ Template: &corev1.PodTemplateSpec{}, }, } )
View Source
var MockWorkspaceWithPresetHash = "89ae127050ec264a5ce84db48ef7226574cdf1299e6bd27fe90b927e34cc8adb"
View Source
var ( MockWorkspaceWithUpdatedDeployment = v1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "testWorkspace", Namespace: "kaito", Annotations: map[string]string{ "workspace.kaito.io/hash": "1171dc5d15043c92e684c8f06689eb241763a735181fdd2b59c8bd8fd6eecdd4", "workspace.kaito.io/revision": "1", }, }, Resource: v1alpha1.ResourceSpec{ Count: &gpuNodeCount, InstanceType: "Standard_NC12s_v3", LabelSelector: &metav1.LabelSelector{ MatchLabels: map[string]string{ "workspace.kaito.io/name": "testWorkspace", }, }, }, Inference: &v1alpha1.InferenceSpec{ Preset: &v1alpha1.PresetSpec{ PresetMeta: v1alpha1.PresetMeta{ Name: "test-model", }, }, Adapters: []v1alpha1.AdapterSpec{ { Source: &v1alpha1.DataSource{ Name: "Adapter-1", Image: "fake.kaito.com/kaito-image:0.0.1", }, Strength: &ValidStrength, }, }, }, } )
View Source
var ValidStrength string = "0.5"
Functions ¶
func IsAlreadyExistsError ¶
func IsAlreadyExistsError() error
func NewTestScheme ¶
func NotFoundError ¶
func NotFoundError() error
func RegisterTestModel ¶
func RegisterTestModel()
Types ¶
type MockClient ¶
type MockClient struct { mock.Mock ObjectMap map[reflect.Type]map[k8sClient.ObjectKey]k8sClient.Object StatusMock *MockStatusClient UpdateCb func(key types.NamespacedName) }
MockClient Client is a mock for the controller-runtime dynamic client interface.
func NewClient ¶
func NewClient() *MockClient
func (*MockClient) Create ¶
func (m *MockClient) Create(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.CreateOption) error
func (*MockClient) CreateMapWithType ¶
func (m *MockClient) CreateMapWithType(t interface{}) map[k8sClient.ObjectKey]k8sClient.Object
func (*MockClient) CreateOrUpdateObjectInMap ¶
func (m *MockClient) CreateOrUpdateObjectInMap(obj k8sClient.Object)
func (*MockClient) Delete ¶
func (m *MockClient) Delete(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.DeleteOption) error
func (*MockClient) DeleteAllOf ¶
func (m *MockClient) DeleteAllOf(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.DeleteAllOfOption) error
func (*MockClient) Get ¶
func (m *MockClient) Get(ctx context.Context, key types.NamespacedName, obj k8sClient.Object, opts ...k8sClient.GetOption) error
Get k8s Client interface
func (*MockClient) GetObjectFromMap ¶
func (m *MockClient) GetObjectFromMap(obj k8sClient.Object, key types.NamespacedName)
func (*MockClient) GroupVersionKindFor ¶
func (m *MockClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
GroupVersionKindFor implements client.Client
func (*MockClient) IsObjectNamespaced ¶
func (m *MockClient) IsObjectNamespaced(obj runtime.Object) (bool, error)
IsObjectNamespaced implements client.Client
func (*MockClient) List ¶
func (m *MockClient) List(ctx context.Context, list k8sClient.ObjectList, opts ...k8sClient.ListOption) error
func (*MockClient) Patch ¶
func (m *MockClient) Patch(ctx context.Context, obj k8sClient.Object, patch k8sClient.Patch, opts ...k8sClient.PatchOption) error
func (*MockClient) RESTMapper ¶
func (m *MockClient) RESTMapper() meta.RESTMapper
func (*MockClient) Scheme ¶
func (m *MockClient) Scheme() *runtime.Scheme
func (*MockClient) Status ¶
func (m *MockClient) Status() k8sClient.StatusWriter
func (*MockClient) SubResource ¶
func (m *MockClient) SubResource(subResource string) k8sClient.SubResourceClient
SubResource implements client.Client
func (*MockClient) Update ¶
func (m *MockClient) Update(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.UpdateOption) error
type MockStatusClient ¶
func (*MockStatusClient) Create ¶
func (m *MockStatusClient) Create(ctx context.Context, obj k8sClient.Object, subResource k8sClient.Object, opts ...k8sClient.SubResourceCreateOption) error
func (*MockStatusClient) Patch ¶
func (m *MockStatusClient) Patch(ctx context.Context, obj k8sClient.Object, patch k8sClient.Patch, opts ...k8sClient.SubResourcePatchOption) error
func (*MockStatusClient) Update ¶
func (m *MockStatusClient) Update(ctx context.Context, obj k8sClient.Object, opts ...k8sClient.SubResourceUpdateOption) error
Click to show internal directories.
Click to hide internal directories.