Documentation
¶
Index ¶
- func GetServiceName(dmSession api.DatamoverSession) string
- func MakePodSpec(dmSession api.DatamoverSession) (*corev1.Pod, error)
- type DatamoverSessionReconciler
- func (r *DatamoverSessionReconciler) CleanupPod(ctx context.Context, dmSession *api.DatamoverSession, resources *resources) error
- func (r *DatamoverSessionReconciler) CleanupService(ctx context.Context, dmSession *api.DatamoverSession, resources *resources) error
- func (r *DatamoverSessionReconciler) CreateNetworkPolicy(ctx context.Context, dmSession api.DatamoverSession) error
- func (r *DatamoverSessionReconciler) CreatePod(ctx context.Context, dmSession api.DatamoverSession) error
- func (r *DatamoverSessionReconciler) CreateResources(ctx context.Context, dmSession api.DatamoverSession, resources *resources) error
- func (r *DatamoverSessionReconciler) CreateService(ctx context.Context, dmSession api.DatamoverSession) error
- func (r *DatamoverSessionReconciler) DeleteNetworkPolicy(ctx context.Context, service *corev1.Service) error
- func (r *DatamoverSessionReconciler) DeletePod(ctx context.Context, pod *corev1.Pod) error
- func (r *DatamoverSessionReconciler) DeleteService(ctx context.Context, service *corev1.Service) error
- func (r *DatamoverSessionReconciler) GetState(ctx context.Context, dmSession *api.DatamoverSession) (State, *resources, error)
- func (r *DatamoverSessionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *DatamoverSessionReconciler) Run(ctx context.Context, dmSession *api.DatamoverSession) (ctrl.Result, error)
- func (r *DatamoverSessionReconciler) SetupWithManager(mgr ctrl.Manager) error
- func (r *DatamoverSessionReconciler) UpdateStatus(ctx context.Context, dmSession *api.DatamoverSession, ...) error
- func (r *DatamoverSessionReconciler) UpdateStatusData(ctx context.Context, dmSession *api.DatamoverSession, ...) error
- func (r *DatamoverSessionReconciler) UpdateStatusFailure(ctx context.Context, dmSession *api.DatamoverSession, ...) error
- func (r *DatamoverSessionReconciler) UpdateStatusResources(ctx context.Context, dmSession *api.DatamoverSession, ...) error
- type State
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 (*DatamoverSessionReconciler) DeleteService ¶
func (*DatamoverSessionReconciler) GetState ¶
func (r *DatamoverSessionReconciler) GetState(ctx context.Context, dmSession *api.DatamoverSession) (State, *resources, error)
func (*DatamoverSessionReconciler) Reconcile ¶
func (r *DatamoverSessionReconciler) 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 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 (r *DatamoverSessionReconciler) Run(ctx context.Context, dmSession *api.DatamoverSession) (ctrl.Result, error)
func (*DatamoverSessionReconciler) SetupWithManager ¶
func (r *DatamoverSessionReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
func (*DatamoverSessionReconciler) UpdateStatus ¶
func (r *DatamoverSessionReconciler) UpdateStatus(ctx context.Context, dmSession *api.DatamoverSession, status api.DatamoverSessionProgress) error
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 )
Click to show internal directories.
Click to hide internal directories.