Documentation
¶
Index ¶
- Variables
- func CreateKubeRuntimeClient(config *rest.Config, cluster *pfschema.Cluster) (framework.RuntimeClientInterface, error)
- func KubeFrameworkVersion(gvk schema.GroupVersionKind) pfschema.FrameworkVersion
- type KubeRuntimeClient
- func (krc *KubeRuntimeClient) Cluster() string
- func (krc *KubeRuntimeClient) ClusterID() string
- func (krc *KubeRuntimeClient) Create(resource interface{}, fv pfschema.FrameworkVersion) error
- func (krc *KubeRuntimeClient) Delete(namespace string, name string, fv pfschema.FrameworkVersion) error
- func (krc *KubeRuntimeClient) Get(namespace string, name string, fv pfschema.FrameworkVersion) (interface{}, error)
- func (krc *KubeRuntimeClient) GetGVR(gvk schema.GroupVersionKind) (meta.RESTMapping, error)
- func (krc *KubeRuntimeClient) GetJobTypeFramework(fv pfschema.FrameworkVersion) (pfschema.JobType, pfschema.Framework)
- func (krc *KubeRuntimeClient) GetTaskLog(namespace, name, logFilePosition string, pageSize, pageNo int) ([]pfschema.TaskLogInfo, error)
- func (krc *KubeRuntimeClient) JobFrameworkVersion(jobType pfschema.JobType, fw pfschema.Framework) pfschema.FrameworkVersion
- func (krc *KubeRuntimeClient) ListNodeQuota(ctx context.Context) (pfschema.QuotaSummary, []pfschema.NodeQuotaInfo, error)
- func (krc *KubeRuntimeClient) Patch(namespace, name string, fv pfschema.FrameworkVersion, data []byte) error
- func (krc *KubeRuntimeClient) RegisterListener(listenerType string, workQueue workqueue.RateLimitingInterface) error
- func (krc *KubeRuntimeClient) StartListener(listenerType string, stopCh <-chan struct{}) error
- func (krc *KubeRuntimeClient) Update(resource interface{}, fv pfschema.FrameworkVersion) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // TaskGVK gvk for task TaskGVK = k8s.PodGVK )
Functions ¶
func CreateKubeRuntimeClient ¶
func KubeFrameworkVersion ¶
func KubeFrameworkVersion(gvk schema.GroupVersionKind) pfschema.FrameworkVersion
Types ¶
type KubeRuntimeClient ¶
type KubeRuntimeClient struct {
Client kubernetes.Interface
// DynamicClient dynamic client
DynamicClient dynamic.Interface
DynamicFactory dynamicinformer.DynamicSharedInformerFactory
// DiscoveryClient client for discovery
DiscoveryClient discovery.DiscoveryInterface
// TODO: adjust field Config
Config *rest.Config
ClusterInfo *pfschema.Cluster
// GVKToGVR contains GroupVersionKind map to GroupVersionResource
GVKToGVR sync.Map
// JobInformerMap contains GroupVersionKind and informer for different kubernetes job
JobInformerMap map[schema.GroupVersionKind]cache.SharedIndexInformer
// QueueInformerMap
QueueInformerMap map[schema.GroupVersionKind]cache.SharedIndexInformer
// contains filtered or unexported fields
}
KubeRuntimeClient for kubernetes client
func NewFakeKubeRuntimeClient ¶
func NewFakeKubeRuntimeClient(server *httptest.Server) *KubeRuntimeClient
func (*KubeRuntimeClient) Cluster ¶
func (krc *KubeRuntimeClient) Cluster() string
func (*KubeRuntimeClient) ClusterID ¶
func (krc *KubeRuntimeClient) ClusterID() string
func (*KubeRuntimeClient) Create ¶
func (krc *KubeRuntimeClient) Create(resource interface{}, fv pfschema.FrameworkVersion) error
func (*KubeRuntimeClient) Delete ¶
func (krc *KubeRuntimeClient) Delete(namespace string, name string, fv pfschema.FrameworkVersion) error
func (*KubeRuntimeClient) Get ¶
func (krc *KubeRuntimeClient) Get(namespace string, name string, fv pfschema.FrameworkVersion) (interface{}, error)
func (*KubeRuntimeClient) GetGVR ¶
func (krc *KubeRuntimeClient) GetGVR(gvk schema.GroupVersionKind) (meta.RESTMapping, error)
func (*KubeRuntimeClient) GetJobTypeFramework ¶
func (krc *KubeRuntimeClient) GetJobTypeFramework(fv pfschema.FrameworkVersion) (pfschema.JobType, pfschema.Framework)
func (*KubeRuntimeClient) GetTaskLog ¶
func (krc *KubeRuntimeClient) GetTaskLog(namespace, name, logFilePosition string, pageSize, pageNo int) ([]pfschema.TaskLogInfo, error)
func (*KubeRuntimeClient) JobFrameworkVersion ¶
func (krc *KubeRuntimeClient) JobFrameworkVersion(jobType pfschema.JobType, fw pfschema.Framework) pfschema.FrameworkVersion
func (*KubeRuntimeClient) ListNodeQuota ¶
func (krc *KubeRuntimeClient) ListNodeQuota(ctx context.Context) (pfschema.QuotaSummary, []pfschema.NodeQuotaInfo, error)
func (*KubeRuntimeClient) Patch ¶
func (krc *KubeRuntimeClient) Patch(namespace, name string, fv pfschema.FrameworkVersion, data []byte) error
func (*KubeRuntimeClient) RegisterListener ¶
func (krc *KubeRuntimeClient) RegisterListener(listenerType string, workQueue workqueue.RateLimitingInterface) error
func (*KubeRuntimeClient) StartListener ¶
func (krc *KubeRuntimeClient) StartListener(listenerType string, stopCh <-chan struct{}) error
func (*KubeRuntimeClient) Update ¶
func (krc *KubeRuntimeClient) Update(resource interface{}, fv pfschema.FrameworkVersion) error
Click to show internal directories.
Click to hide internal directories.