Documentation ¶
Index ¶
- Variables
- func AllBaseUris(c *Controller) ([]string, error)
- func ClearCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
- func ClearOptions() interface{}
- func EventIndexerFunc(obj client.Object) []string
- func EventListOptions(c *Controller) []client.ListOption
- func FirstBaseUri(c *Controller) ([]string, error)
- func GetSampleJobFinalizer(name string) string
- func GetSampleSetFinalizer(name string) string
- func NameObjectKey(c *Controller) client.ObjectKey
- func NamespacedObjectKey(c *Controller) client.ObjectKey
- func NodeListOptions(c *Controller) []client.ListOption
- func PVCCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
- func PVCObject() client.Object
- func PVCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
- func PVObject() client.Object
- func PaddleJobIndexerFunc(obj client.Object) []string
- func PaddleJobListOptions(c *Controller) []client.ListOption
- func RmrCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
- func RmrOptions() interface{}
- func RuntimePodIndexerFunc(obj client.Object) []string
- func RuntimePodListOptions(c *Controller) []client.ListOption
- func SampleJobObject() client.Object
- func SampleJobObjectKey(c *Controller) client.ObjectKey
- func SampleSetObject() client.Object
- func SecretObject() client.Object
- func SecretObjectKey(c *Controller) client.ObjectKey
- func ServiceCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
- func ServiceObject() client.Object
- func ServiceObjectKey(c *Controller) client.ObjectKey
- func SourceSecretObjectKey(c *Controller) client.ObjectKey
- func StatefulSetCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
- func StatefulSetObject() client.Object
- func StatefulSetObjectKey(c *Controller) client.ObjectKey
- func SyncCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
- func SyncOptions() interface{}
- func TerminateCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
- func TerminateOptions() interface{}
- func WarmupCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
- func WarmupOptions() interface{}
- type Controller
- func (c *Controller) CollectCacheStatus(podNames []string) (*v1alpha1.CacheStatus, error)
- func (c *Controller) CollectCacheStatusByIndex(index int) (*v1alpha1.CacheStatus, error)
- func (c *Controller) CollectCacheStatusByPartitions(partitions int) (*v1alpha1.CacheStatus, error)
- func (c *Controller) CreateJobOptions(opt interface{}, j *JobType) error
- func (c *Controller) CreateResource(r *Resource) error
- func (c *Controller) DeleteResource(r *Resource) error
- func (c *Controller) GetJobResult(filename types.UID, j *JobType) (*common.JobResult, error)
- func (c *Controller) GetRequestContext(d Dependence) (*common.RequestContext, error)
- func (c *Controller) GetResource(object client.Object, r *Resource) error
- func (c *Controller) ListResources(list client.ObjectList, r *Resource) error
- func (c *Controller) PostJobOptions(filename types.UID, j *JobType) error
- func (c *Controller) PostJobOptionsWithParam(filename types.UID, j *JobType, param string) error
- func (c *Controller) PostTerminateSignal() error
- func (c *Controller) ResourcesExist(r *Resource) (bool, error)
- func (c *Controller) ResourcesExistWithObject(object client.Object, r *Resource) (bool, error)
- func (c *Controller) UpdateResource(object client.Object, r *Resource) error
- func (c *Controller) UpdateResourceStatus(object client.Object, r *Resource) error
- type Dependence
- type JobType
- type OptionError
- type Resource
- func (r *Resource) CreateSuccessfully() string
- func (r *Resource) ErrorAlreadyExist() string
- func (r *Resource) ErrorCreateObject() string
- func (r *Resource) ErrorDeleteObject() string
- func (r *Resource) GetDependents() []*Resource
- func (r *Resource) GetName() string
- func (r *Resource) UpdateSuccessfully() string
- type SampleJobController
- type SampleJobReconciler
- type SampleSetController
- type SampleSetReconciler
Constants ¶
This section is empty.
Variables ¶
var ( PV *Resource PVC *Resource Node *Resource Secret *Resource Event *Resource Service *Resource SampleSet *Resource SampleJob *Resource PaddleJob *Resource StatefulSet *Resource RuntimePod *Resource SourceSecret *Resource RmrJob *JobType ClearJob *JobType SyncJob *JobType WarmupJob *JobType Terminate *JobType JobTypeMap map[v1alpha1.SampleJobType]*JobType )
Functions ¶
func AllBaseUris ¶
func AllBaseUris(c *Controller) ([]string, error)
func ClearCreateOptions ¶
func ClearCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
func ClearOptions ¶
func ClearOptions() interface{}
func EventIndexerFunc ¶
func EventListOptions ¶
func EventListOptions(c *Controller) []client.ListOption
func FirstBaseUri ¶
func FirstBaseUri(c *Controller) ([]string, error)
func GetSampleJobFinalizer ¶
func GetSampleSetFinalizer ¶
func NameObjectKey ¶
func NameObjectKey(c *Controller) client.ObjectKey
func NamespacedObjectKey ¶
func NamespacedObjectKey(c *Controller) client.ObjectKey
func NodeListOptions ¶
func NodeListOptions(c *Controller) []client.ListOption
func PVCCreateObject ¶
func PVCCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
func PVCreateObject ¶
func PVCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
func PaddleJobIndexerFunc ¶
func PaddleJobListOptions ¶
func PaddleJobListOptions(c *Controller) []client.ListOption
func RmrCreateOptions ¶
func RmrCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
func RmrOptions ¶
func RmrOptions() interface{}
func RuntimePodIndexerFunc ¶
func RuntimePodListOptions ¶
func RuntimePodListOptions(c *Controller) []client.ListOption
func SampleJobObject ¶
func SampleJobObjectKey ¶
func SampleJobObjectKey(c *Controller) client.ObjectKey
func SampleSetObject ¶
func SecretObject ¶
func SecretObjectKey ¶
func SecretObjectKey(c *Controller) client.ObjectKey
func ServiceCreateObject ¶
func ServiceCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
func ServiceObject ¶
func ServiceObjectKey ¶
func ServiceObjectKey(c *Controller) client.ObjectKey
func SourceSecretObjectKey ¶
func SourceSecretObjectKey(c *Controller) client.ObjectKey
func StatefulSetCreateObject ¶
func StatefulSetCreateObject(c *Controller, object client.Object, ctx *common.RequestContext) error
func StatefulSetObject ¶
func StatefulSetObjectKey ¶
func StatefulSetObjectKey(c *Controller) client.ObjectKey
func SyncCreateOptions ¶
func SyncCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
func SyncOptions ¶
func SyncOptions() interface{}
func TerminateCreateOptions ¶
func TerminateCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
func TerminateOptions ¶
func TerminateOptions() interface{}
func WarmupCreateOptions ¶
func WarmupCreateOptions(c *Controller, opt interface{}, ctx *common.RequestContext) error
func WarmupOptions ¶
func WarmupOptions() interface{}
Types ¶
type Controller ¶
func (*Controller) CollectCacheStatus ¶
func (c *Controller) CollectCacheStatus(podNames []string) (*v1alpha1.CacheStatus, error)
func (*Controller) CollectCacheStatusByIndex ¶
func (c *Controller) CollectCacheStatusByIndex(index int) (*v1alpha1.CacheStatus, error)
func (*Controller) CollectCacheStatusByPartitions ¶
func (c *Controller) CollectCacheStatusByPartitions(partitions int) (*v1alpha1.CacheStatus, error)
func (*Controller) CreateJobOptions ¶
func (c *Controller) CreateJobOptions(opt interface{}, j *JobType) error
func (*Controller) CreateResource ¶
func (c *Controller) CreateResource(r *Resource) error
func (*Controller) DeleteResource ¶
func (c *Controller) DeleteResource(r *Resource) error
func (*Controller) GetJobResult ¶
func (*Controller) GetRequestContext ¶
func (c *Controller) GetRequestContext(d Dependence) (*common.RequestContext, error)
func (*Controller) GetResource ¶
func (c *Controller) GetResource(object client.Object, r *Resource) error
func (*Controller) ListResources ¶
func (c *Controller) ListResources(list client.ObjectList, r *Resource) error
func (*Controller) PostJobOptions ¶
func (c *Controller) PostJobOptions(filename types.UID, j *JobType) error
func (*Controller) PostJobOptionsWithParam ¶
func (*Controller) PostTerminateSignal ¶
func (c *Controller) PostTerminateSignal() error
func (*Controller) ResourcesExist ¶
func (c *Controller) ResourcesExist(r *Resource) (bool, error)
func (*Controller) ResourcesExistWithObject ¶
func (*Controller) UpdateResource ¶
func (c *Controller) UpdateResource(object client.Object, r *Resource) error
func (*Controller) UpdateResourceStatus ¶
func (c *Controller) UpdateResourceStatus(object client.Object, r *Resource) error
type Dependence ¶
type JobType ¶
type JobType struct { Name string OptionPath string ResultPath string Dependents []*Resource Options func() interface{} BaseUris func(c *Controller) ([]string, error) CreateOptions func(c *Controller, opt interface{}, ctx *common.RequestContext) error }
func NewJobOptions ¶
func (*JobType) CreateSuccessfully ¶
func (*JobType) DoJobSuccessfully ¶
func (*JobType) ErrorCreateJob ¶
func (*JobType) ErrorDoJob ¶
func (*JobType) GetDependents ¶
type OptionError ¶
type OptionError struct{}
func (*OptionError) Error ¶
func (e *OptionError) Error() string
type Resource ¶
type Resource struct { Name string WithLabel bool Dependents []*Resource Object func() client.Object ObjectKey func(c *Controller) client.ObjectKey ListOptions func(c *Controller) []client.ListOption CreateObject func(c *Controller, object client.Object, ctx *common.RequestContext) error }
func NewResource ¶
func (*Resource) CreateSuccessfully ¶
func (*Resource) ErrorAlreadyExist ¶
func (*Resource) ErrorCreateObject ¶
func (*Resource) ErrorDeleteObject ¶
func (*Resource) GetDependents ¶
func (*Resource) UpdateSuccessfully ¶
type SampleJobController ¶
type SampleJobController struct { Controller SampleJob *v1alpha1.SampleJob }
func NewSampleJobController ¶
func NewSampleJobController( sampleJob *v1alpha1.SampleJob, CSIDriver driver.Driver, ctx *common.ReconcileContext) *SampleJobController
type SampleJobReconciler ¶
type SampleJobReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder }
SampleJobReconciler reconciles a SampleJob object
func (*SampleJobReconciler) AddFinalizer ¶
func (r *SampleJobReconciler) AddFinalizer(ctx context.Context, sampleJob *v1alpha1.SampleJob) (ctrl.Result, error)
AddFinalizer add finalizer to SampleJob
func (*SampleJobReconciler) 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. the SampleJob 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.8.3/pkg/reconcile
func (*SampleJobReconciler) SetupWithManager ¶
func (r *SampleJobReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SampleSetController ¶
type SampleSetController struct { Controller SampleSet *v1alpha1.SampleSet }
func NewSampleSetController ¶
func NewSampleSetController( sampleSet *v1alpha1.SampleSet, CSIDriver driver.Driver, ctx *common.ReconcileContext) *SampleSetController
type SampleSetReconciler ¶
type SampleSetReconciler struct { client.Client Log logr.Logger Scheme *runtime.Scheme Recorder record.EventRecorder }
SampleSetReconciler reconciles a SampleSet object
func (*SampleSetReconciler) AddFinalizer ¶
func (r *SampleSetReconciler) AddFinalizer(ctx context.Context, sampleSet *v1alpha1.SampleSet) (ctrl.Result, error)
AddFinalizer add finalizer to SampleSet
func (*SampleSetReconciler) 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. the SampleSet 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.8.3/pkg/reconcile
func (*SampleSetReconciler) SetupWithManager ¶
func (r *SampleSetReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.