controller

package
v0.0.8-internal Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultKaiwoQueueConfigName = "kaiwo"

Variables

View Source
var DefaultDeploymentSpec = appsv1.DeploymentSpec{
	Replicas: func(i int32) *int32 { return &i }(1),
	Selector: &metav1.LabelSelector{
		MatchLabels: map[string]string{"app": "default-app"},
	},
	Template: controllerutils.DefaultPodTemplateSpec,
}
View Source
var DefaultJobSpec = batchv1.JobSpec{
	TTLSecondsAfterFinished: func(i int32) *int32 { return &i }(3600),
	Template:                controllerutils.DefaultPodTemplateSpec,
}
View Source
var DefaultRayJobSpec = rayv1.RayJobSpec{
	ShutdownAfterJobFinishes: true,
	RayClusterSpec: &rayv1.RayClusterSpec{
		EnableInTreeAutoscaling: controllerutils.BoolPtr(false),
		HeadGroupSpec: rayv1.HeadGroupSpec{
			Template: controllerutils.DefaultPodTemplateSpec,
		},
		WorkerGroupSpecs: []rayv1.WorkerGroupSpec{
			{
				GroupName:   "default-worker-group",
				Replicas:    controllerutils.Int32Ptr(1),
				MinReplicas: controllerutils.Int32Ptr(1),
				MaxReplicas: controllerutils.Int32Ptr(1),

				Template: controllerutils.DefaultPodTemplateSpec,
			},
		},
	},
}

Functions

This section is empty.

Types

type KaiwoJobReconciler

type KaiwoJobReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

KaiwoJobReconciler reconciles a KaiwoJob object

func (*KaiwoJobReconciler) Reconcile

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

func (*KaiwoJobReconciler) SetupWithManager

func (r *KaiwoJobReconciler) SetupWithManager(mgr ctrl.Manager) error

type KaiwoQueueConfigReconciler

type KaiwoQueueConfigReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

KaiwoQueueConfigReconciler reconciles a KaiwoQueueConfig object

func (*KaiwoQueueConfigReconciler) CreateDefaultKaiwoQueueConfig

func (r *KaiwoQueueConfigReconciler) CreateDefaultKaiwoQueueConfig(ctx context.Context, name string) error

func (*KaiwoQueueConfigReconciler) EnsureDefaultKaiwoQueueConfig

func (r *KaiwoQueueConfigReconciler) EnsureDefaultKaiwoQueueConfig(ctx context.Context) error

func (*KaiwoQueueConfigReconciler) Reconcile

func (*KaiwoQueueConfigReconciler) SetupWithManager

func (r *KaiwoQueueConfigReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*KaiwoQueueConfigReconciler) SyncKueueResources

func (r *KaiwoQueueConfigReconciler) SyncKueueResources(ctx context.Context, queueConfig *kaiwov1alpha1.KaiwoQueueConfig) error

type KaiwoServiceReconciler

type KaiwoServiceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

KaiwoServiceReconciler reconciles a KaiwoService object

func (*KaiwoServiceReconciler) Reconcile

func (r *KaiwoServiceReconciler) 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. TODO(user): Modify the Reconcile function to compare the state specified by the KaiwoService object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.20.0/pkg/reconcile

func (*KaiwoServiceReconciler) SetupWithManager

func (r *KaiwoServiceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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