Documentation ¶
Index ¶
- Constants
- func CreateDeploymentPayload(version string) (ret *appsv1.Deployment, err error)
- func CreatePayload(version string) (ret *appsv1.DaemonSet, err error)
- type ConfigmapOperator
- type DaemonSetOperator
- func (c *DaemonSetOperator) CreateDaemonSet(obj *v1.GPUManager) error
- func (c *DaemonSetOperator) DeleteDaemonSet(obj *v1.GPUManager) error
- func (c *DaemonSetOperator) DiffDaemonSet(obj *v1.GPUManager) (needUpgrade bool, err error)
- func (c *DaemonSetOperator) GetDaemonSet(obj *v1.GPUManager) (ds *appsv1.DaemonSet, opErr error)
- func (c *DaemonSetOperator) UpdateDaemonSet(obj *v1.GPUManager) error
- func (c *DaemonSetOperator) UpdateGPUManagerStatus(obj *v1.GPUManager) error
- type DeploymentOperator
- func (c *DeploymentOperator) CreateDeployment(obj *v1.GPUManager) error
- func (c *DeploymentOperator) DeleteDeployment(obj *v1.GPUManager) error
- func (c *DeploymentOperator) DiffDeployment(obj *v1.GPUManager) (needUpgrade bool, err error)
- func (c *DeploymentOperator) GetDeployment(obj *v1.GPUManager) (ds *appsv1.Deployment, opErr error)
- func (c *DeploymentOperator) UpdateDeployment(obj *v1.GPUManager) error
- type ServiceAccountOperator
- type ServiceMetricOperator
- type ServiceOperator
Constants ¶
const ( // DefaultDaemonSetName defines the name of GPUManager daemonset DefaultDaemonSetName = "gpu-manager-daemonset" // LabelNodeRoleMaster defines the label name of node role LabelNodeRoleMaster = "node-role.kubernetes.io/master" )
const (
// DefaultConfigmapName defines the name of service for the metric service of GPUManager
DefaultConfigmapName = "gpu-quota-admission"
)
const (
// DefaultDeploymentName defines the name of GPUManager deployment
DefaultDeploymentName = "gpu-quota-admission"
)
const (
// DefaultServiceAccountName defines the service account and role-binding name of GPUManager
DefaultServiceAccountName = "gpu-manager"
)
const (
// DefaultServiceMetricName defines the name of service for the metric service of GPUManager
DefaultServiceMetricName = "gpu-manager-metric"
)
const (
// DefaultServiceName defines the name of service for the metric service of GPUManager
DefaultServiceName = "gpu-quota-admission"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDeploymentPayload ¶
func CreateDeploymentPayload(version string) (ret *appsv1.Deployment, err error)
CreateDeploymentPayload returns the deployment which holds GPUManager information
Types ¶
type ConfigmapOperator ¶
type ConfigmapOperator struct {
K8sCli kubernetes.Interface
}
ConfigmapOperator is used to operate remote service account and role-binding
func (*ConfigmapOperator) CreateConfigmap ¶
func (s *ConfigmapOperator) CreateConfigmap(clusterName string) error
CreateConfigmap create a service to help collecting metrics of GPUManager
func (*ConfigmapOperator) DeleteConfigmap ¶
func (s *ConfigmapOperator) DeleteConfigmap(clusterName string) error
DeleteConfigmap delete a configmap of metric of GPUManager
type DaemonSetOperator ¶
type DaemonSetOperator struct { TkeCli clientset.Interface K8sCli kubernetes.Interface CrDomain string CrNamespace string }
DaemonSetOperator is used to operate remote GPUManager daemonset
func (*DaemonSetOperator) CreateDaemonSet ¶
func (c *DaemonSetOperator) CreateDaemonSet(obj *v1.GPUManager) error
CreateDaemonSet implements DaemonSetOperator
func (*DaemonSetOperator) DeleteDaemonSet ¶
func (c *DaemonSetOperator) DeleteDaemonSet(obj *v1.GPUManager) error
DeleteDaemonSet implements DaemonSetOperator
func (*DaemonSetOperator) DiffDaemonSet ¶
func (c *DaemonSetOperator) DiffDaemonSet(obj *v1.GPUManager) (needUpgrade bool, err error)
DiffDaemonSet implements DaemonSetOperator
func (*DaemonSetOperator) GetDaemonSet ¶
func (c *DaemonSetOperator) GetDaemonSet(obj *v1.GPUManager) (ds *appsv1.DaemonSet, opErr error)
GetDaemonSet implements DaemonSetOperator
func (*DaemonSetOperator) UpdateDaemonSet ¶
func (c *DaemonSetOperator) UpdateDaemonSet(obj *v1.GPUManager) error
UpdateDaemonSet implements DaemonSetOperator
func (*DaemonSetOperator) UpdateGPUManagerStatus ¶
func (c *DaemonSetOperator) UpdateGPUManagerStatus(obj *v1.GPUManager) error
UpdateGPUManagerStatus implements Operator
type DeploymentOperator ¶
type DeploymentOperator struct { TkeCli clientset.Interface K8sCli kubernetes.Interface CrDomain string CrNamespace string }
DeploymentOperator is used to operate remote GPUManager deployment
func (*DeploymentOperator) CreateDeployment ¶
func (c *DeploymentOperator) CreateDeployment(obj *v1.GPUManager) error
CreateDeployment implements DeploymentOperator
func (*DeploymentOperator) DeleteDeployment ¶
func (c *DeploymentOperator) DeleteDeployment(obj *v1.GPUManager) error
DeleteDeployment implements DeploymentOperator
func (*DeploymentOperator) DiffDeployment ¶
func (c *DeploymentOperator) DiffDeployment(obj *v1.GPUManager) (needUpgrade bool, err error)
DiffDeployment implements DeploymentOperator
func (*DeploymentOperator) GetDeployment ¶
func (c *DeploymentOperator) GetDeployment(obj *v1.GPUManager) (ds *appsv1.Deployment, opErr error)
GetDeployment implements DeploymentOperator
func (*DeploymentOperator) UpdateDeployment ¶
func (c *DeploymentOperator) UpdateDeployment(obj *v1.GPUManager) error
UpdateDeployment implements DeploymentOperator
type ServiceAccountOperator ¶
type ServiceAccountOperator struct {
K8sCli kubernetes.Interface
}
ServiceAccountOperator is used to operate remote service account and role-binding
func (*ServiceAccountOperator) CreateServiceAccount ¶
func (sa *ServiceAccountOperator) CreateServiceAccount(clusterName string) error
CreateServiceAccount create a service account and role-binding of clusterName
func (*ServiceAccountOperator) DeleteServiceAccount ¶
func (sa *ServiceAccountOperator) DeleteServiceAccount(clusterName string) error
DeleteServiceAccount delete a service account and role-binding of clusterName
type ServiceMetricOperator ¶
type ServiceMetricOperator struct {
K8sCli kubernetes.Interface
}
ServiceMetricOperator is used to operate remote service account and role-binding
func (*ServiceMetricOperator) CreateServiceMetric ¶
func (s *ServiceMetricOperator) CreateServiceMetric(clusterName string) error
CreateServiceMetric create a service to help collecting metrics of GPUManager
func (*ServiceMetricOperator) DeleteServiceMetric ¶
func (s *ServiceMetricOperator) DeleteServiceMetric(clusterName string) error
DeleteServiceMetric delete a service of metric of GPUManager
type ServiceOperator ¶
type ServiceOperator struct {
K8sCli kubernetes.Interface
}
ServiceOperator is used to operate remote service account and role-binding
func (*ServiceOperator) CreateService ¶
func (s *ServiceOperator) CreateService(clusterName string) error
CreateService create a service to help collecting metrics of GPUManager
func (*ServiceOperator) DeleteService ¶
func (s *ServiceOperator) DeleteService(clusterName string) error
DeleteService delete a service of metric of GPUManager