Documentation ¶
Index ¶
- Variables
- func UpdateRuntime(clusterInfo model.ClusterInfo) error
- type KubeRuntime
- func (kr *KubeRuntime) BuildConfig() (*rest.Config, error)
- func (kr *KubeRuntime) Client() framework.RuntimeClientInterface
- func (kr *KubeRuntime) CreateObject(obj *unstructured.Unstructured) error
- func (kr *KubeRuntime) CreatePV(namespace, fsID string) (string, error)
- func (kr *KubeRuntime) CreatePVC(namespace, fsId, pv string) error
- func (kr *KubeRuntime) CreateQueue(queue *api.QueueInfo) error
- func (kr *KubeRuntime) DeleteJob(job *api.PFJob) error
- func (kr *KubeRuntime) DeleteObject(namespace, name string, gvk schema.GroupVersionKind) error
- func (kr *KubeRuntime) DeletePersistentVolume(name string, deleteOptions metav1.DeleteOptions) error
- func (kr *KubeRuntime) DeletePersistentVolumeClaim(namespace string, name string, deleteOptions metav1.DeleteOptions) error
- func (kr *KubeRuntime) DeletePod(namespace, name string) error
- func (kr *KubeRuntime) DeleteQueue(queue *api.QueueInfo) error
- func (kr *KubeRuntime) GetJobLog(jobLogRequest pfschema.JobLogRequest) (pfschema.JobLogInfo, error)
- func (kr *KubeRuntime) GetObject(namespace, name string, gvk schema.GroupVersionKind) (interface{}, error)
- func (kr *KubeRuntime) GetPersistentVolumeClaims(namespace, name string, getOptions metav1.GetOptions) (*corev1.PersistentVolumeClaim, error)
- func (kr *KubeRuntime) GetQueueUsedQuota(q *api.QueueInfo) (*resources.Resource, error)
- func (kr *KubeRuntime) Init() error
- func (kr *KubeRuntime) Job(fwVersion pfschema.FrameworkVersion) framework.JobInterface
- func (kr *KubeRuntime) ListNamespaces(listOptions metav1.ListOptions) (*corev1.NamespaceList, error)
- func (kr *KubeRuntime) ListNodeQuota() (pfschema.QuotaSummary, []pfschema.NodeQuotaInfo, error)
- func (kr *KubeRuntime) ListPods(namespace string, listOptions metav1.ListOptions) (*corev1.PodList, error)
- func (kr *KubeRuntime) Name() string
- func (kr *KubeRuntime) PatchPVCFinalizerNull(namespace, name string) error
- func (kr *KubeRuntime) Queue(fwVersion pfschema.FrameworkVersion) framework.QueueInterface
- func (kr *KubeRuntime) StopJob(job *api.PFJob) error
- func (kr *KubeRuntime) String() string
- func (kr *KubeRuntime) SubmitJob(job *api.PFJob) error
- func (kr *KubeRuntime) SyncController(stopCh <-chan struct{})
- func (kr *KubeRuntime) UpdateJob(job *api.PFJob) error
- func (kr *KubeRuntime) UpdateObject(obj *unstructured.Unstructured) error
- func (kr *KubeRuntime) UpdateQueue(queue *api.QueueInfo) error
- type RuntimeService
Constants ¶
This section is empty.
Variables ¶
View Source
var PFRuntimeMap sync.Map
Functions ¶
func UpdateRuntime ¶
func UpdateRuntime(clusterInfo model.ClusterInfo) error
Types ¶
type KubeRuntime ¶
type KubeRuntime struct {
// contains filtered or unexported fields
}
func (*KubeRuntime) BuildConfig ¶
func (kr *KubeRuntime) BuildConfig() (*rest.Config, error)
func (*KubeRuntime) Client ¶
func (kr *KubeRuntime) Client() framework.RuntimeClientInterface
func (*KubeRuntime) CreateObject ¶
func (kr *KubeRuntime) CreateObject(obj *unstructured.Unstructured) error
func (*KubeRuntime) CreatePV ¶
func (kr *KubeRuntime) CreatePV(namespace, fsID string) (string, error)
func (*KubeRuntime) CreatePVC ¶
func (kr *KubeRuntime) CreatePVC(namespace, fsId, pv string) error
func (*KubeRuntime) CreateQueue ¶
func (kr *KubeRuntime) CreateQueue(queue *api.QueueInfo) error
func (*KubeRuntime) DeleteObject ¶
func (kr *KubeRuntime) DeleteObject(namespace, name string, gvk schema.GroupVersionKind) error
func (*KubeRuntime) DeletePersistentVolume ¶
func (kr *KubeRuntime) DeletePersistentVolume(name string, deleteOptions metav1.DeleteOptions) error
func (*KubeRuntime) DeletePersistentVolumeClaim ¶
func (kr *KubeRuntime) DeletePersistentVolumeClaim(namespace string, name string, deleteOptions metav1.DeleteOptions) error
func (*KubeRuntime) DeletePod ¶
func (kr *KubeRuntime) DeletePod(namespace, name string) error
func (*KubeRuntime) DeleteQueue ¶
func (kr *KubeRuntime) DeleteQueue(queue *api.QueueInfo) error
func (*KubeRuntime) GetJobLog ¶
func (kr *KubeRuntime) GetJobLog(jobLogRequest pfschema.JobLogRequest) (pfschema.JobLogInfo, error)
func (*KubeRuntime) GetObject ¶
func (kr *KubeRuntime) GetObject(namespace, name string, gvk schema.GroupVersionKind) (interface{}, error)
func (*KubeRuntime) GetPersistentVolumeClaims ¶
func (kr *KubeRuntime) GetPersistentVolumeClaims(namespace, name string, getOptions metav1.GetOptions) (*corev1.PersistentVolumeClaim, error)
func (*KubeRuntime) GetQueueUsedQuota ¶
func (*KubeRuntime) Init ¶
func (kr *KubeRuntime) Init() error
func (*KubeRuntime) Job ¶
func (kr *KubeRuntime) Job(fwVersion pfschema.FrameworkVersion) framework.JobInterface
func (*KubeRuntime) ListNamespaces ¶
func (kr *KubeRuntime) ListNamespaces(listOptions metav1.ListOptions) (*corev1.NamespaceList, error)
func (*KubeRuntime) ListNodeQuota ¶
func (kr *KubeRuntime) ListNodeQuota() (pfschema.QuotaSummary, []pfschema.NodeQuotaInfo, error)
ListNodeQuota return node resources, including cpu, memory, and extend resources
func (*KubeRuntime) ListPods ¶
func (kr *KubeRuntime) ListPods(namespace string, listOptions metav1.ListOptions) (*corev1.PodList, error)
func (*KubeRuntime) Name ¶
func (kr *KubeRuntime) Name() string
func (*KubeRuntime) PatchPVCFinalizerNull ¶
func (kr *KubeRuntime) PatchPVCFinalizerNull(namespace, name string) error
func (*KubeRuntime) Queue ¶
func (kr *KubeRuntime) Queue(fwVersion pfschema.FrameworkVersion) framework.QueueInterface
func (*KubeRuntime) String ¶
func (kr *KubeRuntime) String() string
func (*KubeRuntime) SyncController ¶
func (kr *KubeRuntime) SyncController(stopCh <-chan struct{})
func (*KubeRuntime) UpdateObject ¶
func (kr *KubeRuntime) UpdateObject(obj *unstructured.Unstructured) error
func (*KubeRuntime) UpdateQueue ¶
func (kr *KubeRuntime) UpdateQueue(queue *api.QueueInfo) error
type RuntimeService ¶
type RuntimeService interface { Name() string // Init create client for runtime Init() error // Client return runtime service client Client() framework.RuntimeClientInterface // SyncController start sync controller SyncController(stopCh <-chan struct{}) // SubmitJob submit job to cluster SubmitJob(job *api.PFJob) error // StopJob stop job on cluster StopJob(job *api.PFJob) error // UpdateJob update job on cluster UpdateJob(job *api.PFJob) error // DeleteJob delete job from cluster DeleteJob(job *api.PFJob) error // GetJobLog get log for job GetJobLog(jobLogRequest schema.JobLogRequest) (schema.JobLogInfo, error) // CreateQueue create a queue on cluster CreateQueue(q *api.QueueInfo) error // DeleteQueue delete a queue on cluster DeleteQueue(q *api.QueueInfo) error // UpdateQueue update a queue on cluster UpdateQueue(q *api.QueueInfo) error ListNodeQuota() (schema.QuotaSummary, []schema.NodeQuotaInfo, error) framework.JobGetter framework.QueueGetter }
func CreateRuntime ¶
func CreateRuntime(clusterInfo model.ClusterInfo) (RuntimeService, error)
CreateRuntime create RuntimeService and stored in Cache
func GetOrCreateRuntime ¶
func GetOrCreateRuntime(clusterInfo model.ClusterInfo) (RuntimeService, error)
func NewKubeRuntime ¶
func NewKubeRuntime(cluster pfschema.Cluster) RuntimeService
Click to show internal directories.
Click to hide internal directories.