controller

package
v0.0.0-...-6777fe2 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServiceName

func GetServiceName(dmSession api.DatamoverSession) string

func MakePodSpec

func MakePodSpec(dmSession api.DatamoverSession) (*corev1.Pod, error)

Types

type DatamoverSessionReconciler

type DatamoverSessionReconciler struct {
	client.Client
	Scheme     *runtime.Scheme
	RestConfig rest.Config
	// contains filtered or unexported fields
}

DatamoverSessionReconciler reconciles a DatamoverSession object

func (*DatamoverSessionReconciler) CleanupPod

func (r *DatamoverSessionReconciler) CleanupPod(ctx context.Context, dmSession *api.DatamoverSession, resources *resources) error

func (*DatamoverSessionReconciler) CleanupService

func (r *DatamoverSessionReconciler) CleanupService(ctx context.Context, dmSession *api.DatamoverSession, resources *resources) error

func (*DatamoverSessionReconciler) CreateNetworkPolicy

func (r *DatamoverSessionReconciler) CreateNetworkPolicy(ctx context.Context, dmSession api.DatamoverSession) error

func (*DatamoverSessionReconciler) CreatePod

func (r *DatamoverSessionReconciler) CreatePod(ctx context.Context, dmSession api.DatamoverSession) error

func (*DatamoverSessionReconciler) CreateResources

func (r *DatamoverSessionReconciler) CreateResources(ctx context.Context, dmSession api.DatamoverSession, resources *resources) error

func (*DatamoverSessionReconciler) CreateService

func (r *DatamoverSessionReconciler) CreateService(ctx context.Context, dmSession api.DatamoverSession) error

func (*DatamoverSessionReconciler) DeleteNetworkPolicy

func (r *DatamoverSessionReconciler) DeleteNetworkPolicy(ctx context.Context, service *corev1.Service) error

func (*DatamoverSessionReconciler) DeletePod

func (r *DatamoverSessionReconciler) DeletePod(ctx context.Context, pod *corev1.Pod) error

func (*DatamoverSessionReconciler) DeleteService

func (r *DatamoverSessionReconciler) DeleteService(ctx context.Context, service *corev1.Service) error

func (*DatamoverSessionReconciler) GetState

func (r *DatamoverSessionReconciler) GetState(ctx context.Context, dmSession *api.DatamoverSession) (State, *resources, error)

func (*DatamoverSessionReconciler) Reconcile

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 DatamoverSession 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.19.0/pkg/reconcile

func (*DatamoverSessionReconciler) Run

func (*DatamoverSessionReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*DatamoverSessionReconciler) UpdateStatus

func (*DatamoverSessionReconciler) UpdateStatusData

func (r *DatamoverSessionReconciler) UpdateStatusData(ctx context.Context, dmSession *api.DatamoverSession, status api.DatamoverSessionProgress, resources resources) error

func (*DatamoverSessionReconciler) UpdateStatusFailure

func (r *DatamoverSessionReconciler) UpdateStatusFailure(ctx context.Context, dmSession *api.DatamoverSession, status api.DatamoverSessionProgress, resources *resources) error

func (*DatamoverSessionReconciler) UpdateStatusResources

func (r *DatamoverSessionReconciler) UpdateStatusResources(ctx context.Context, dmSession *api.DatamoverSession, status api.DatamoverSessionProgress, resources resources) error

type State

type State int
const (
	None State = iota
	Init

	ValidationFailed
	CreateResourcesSuccess
	// TODO: these states are reachable only if we introduce a retry limit
	// CreateResourcesFailedDirty
	// CreateResourcesFailedClean
	CreateResourcesInProgress

	ReadinessWait
	ReadinessSuccess
	ReadinessResourcesMissing
	ReadinessResourcesFailure

	ReadinessFailedDirty
	ReadinessFailedClean

	SessionRunning
	SessionResourcesFailure
	SessionFailedDirty
	SessionFailedClean
)

Jump to

Keyboard shortcuts

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