test_job

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyClient

type DummyClient struct {
	client.Reader
	client.Writer
	client.StatusClient
	Cache []client.Object
	// contains filtered or unexported fields
}

func (*DummyClient) Create

func (c *DummyClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error

func (*DummyClient) Delete

func (c *DummyClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

func (*DummyClient) RESTMapper

func (c *DummyClient) RESTMapper() meta.RESTMapper

func (*DummyClient) Scheme

func (c *DummyClient) Scheme() *runtime.Scheme

func (*DummyClient) Update

func (c *DummyClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error

type TestReconciler

func NewTestReconciler

func NewTestReconciler() *TestReconciler

func (*TestReconciler) ExtractJobStatus

func (r *TestReconciler) ExtractJobStatus(job client.Object) (*commonv1.JobStatus, error)

func (*TestReconciler) ExtractReplicasSpec

func (r *TestReconciler) ExtractReplicasSpec(job client.Object) (map[commonv1.ReplicaType]*commonv1.ReplicaSpec, error)

func (*TestReconciler) ExtractRunPolicy

func (r *TestReconciler) ExtractRunPolicy(job client.Object) (*commonv1.RunPolicy, error)

func (*TestReconciler) GetDefaultContainerName

func (r *TestReconciler) GetDefaultContainerName() string

func (*TestReconciler) GetJob

func (r *TestReconciler) GetJob(ctx context.Context, req ctrl.Request) (client.Object, error)

func (*TestReconciler) GetPodGroupForJob

func (r *TestReconciler) GetPodGroupForJob(ctx context.Context, job client.Object) (client.Object, error)

func (*TestReconciler) GetPodsForJob

func (r *TestReconciler) GetPodsForJob(ctx context.Context, job client.Object) ([]*corev1.Pod, error)

func (*TestReconciler) GetReconcilerName

func (r *TestReconciler) GetReconcilerName() string

func (*TestReconciler) GetServicesForJob

func (r *TestReconciler) GetServicesForJob(ctx context.Context, job client.Object) ([]*corev1.Service, error)

func (*TestReconciler) IsMasterRole

func (r *TestReconciler) IsMasterRole(replicas map[commonv1.ReplicaType]*commonv1.ReplicaSpec, rtype commonv1.ReplicaType, index int) bool

func (*TestReconciler) Reconcile

func (r *TestReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

Jump to

Keyboard shortcuts

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