Documentation ¶
Index ¶
- Constants
- func Decrypt(s string, keyring []byte) ([]byte, error)
- func GetTimeDiffer(startTime time.Time, endTime time.Time) (differ string)
- func PKCS5UnPadding(origData []byte) []byte
- func StoreUserInfoToConfigMap(userInfo UserInfo) error
- type AKInfo
- type ArmsInfo
- type ClusterNodeInfo
- type ClusterNodeInfoList
- type ClusterRequestResource
- type ClusterTotalResource
- type CodeSource
- type CodeSourceMap
- type CronHistoryInfo
- type CronInfo
- type DataSource
- type DataSourceMap
- type EvaluateJobInfo
- type HistoryJobStatistic
- type JobInfo
- type JobResource
- type JobStatistics
- type OAuthApp
- func (oAuthApp *OAuthApp) GetAppName() string
- func (oAuthApp *OAuthApp) GetDevConsoleHost() (host string, err error)
- func (oAuthApp *OAuthApp) GetDevConsoleHostWithRetry(tryTimes int, tryIntervalSec int) (host string, err error)
- func (oAuthApp *OAuthApp) GetDisplayName() string
- func (oAuthApp *OAuthApp) GetName() string
- func (oAuthApp *OAuthApp) GetRedirectURI() string
- func (oAuthApp *OAuthApp) GetWebURI() string
- type OAuthInfo
- type RoleAuth
- type Spec
- type SpecReplicaStatus
- type SubmitEvaluateJobArgs
- type SubmitJobArgs
- type UserInfo
- type UserInfoMap
Constants ¶
View Source
const ( // ClusterID is ACK cluster id ClusterID = "kubernetes.cluster.id" // RegionID is aliyun region id, Ex. cn-hangzhou RegionID = "region.id" // AppNamespace is namespace of dlc on ACK AppNamespace = "app.namespace" // AppName is name of develop console AppName = "app.name" DevConsoleHost = "kube-ai.dev-console.host" // DefaultDomain is domain of oauth app DefaultDomain = "default.domain" EnvIngressEnable = "KUBE_DL_INGRESS_ENABLE" EnvKubedlHOST = "KUBE_DL_HOST" DevConsoleDefaultNamespace = "kube-ai" DevConsoleDefaultName = "ack-ai-dev-console" )
View Source
const (
TimeFormat = "2006-01-02 15:04:05"
)
Variables ¶
This section is empty.
Functions ¶
func GetTimeDiffer ¶
GetTimeDiffer computes time differ duration between 2 time values, formated as 2h2m2s.
func PKCS5UnPadding ¶
Types ¶
type AKInfo ¶
type AKInfo struct { AccessKeyId string `json:"access.key.id"` AccessKeySecret string `json:"access.key.secret"` SecurityToken string `json:"security.token"` Expiration string `json:"expiration"` Keyring string `json:"keyring"` }
func (*AKInfo) DecryptFromString ¶
type ClusterNodeInfo ¶
type ClusterNodeInfo struct { NodeName string `json:"nodeName"` InstanceType string `json:"instanceType"` GPUType string `json:"gpuType"` TotalCPU int64 `json:"totalCPU"` TotalMemory int64 `json:"totalMemory"` TotalGPU int64 `json:"totalGPU"` RequestCPU int64 `json:"requestCPU"` RequestMemory int64 `json:"requestMemory"` RequestGPU int64 `json:"requestGPU"` }
type ClusterNodeInfoList ¶
type ClusterNodeInfoList struct {
Items []ClusterNodeInfo `json:"items,omitempty"`
}
type ClusterRequestResource ¶
type ClusterTotalResource ¶
type CodeSource ¶
type CodeSource struct { UserId string `json:"userid"` Username string `json:"username"` Name string `json:"name"` Type string `json:"type"` CodePath string `json:"code_path"` DefaultBranch string `json:"default_branch"` LocalPath string `json:"local_path"` Description string `json:"description"` GitUsername string `json:"git_username"` GitPassword string `json:"git_password"` CreateTime string `json:"create_time"` UpdateTime string `json:"update_time"` }
type CodeSourceMap ¶
type CodeSourceMap map[string]CodeSource
type CronHistoryInfo ¶
type CronInfo ¶
type CronInfo struct { Name string `json:"name,omitempty"` Namespace string `json:"namespace,omitempty"` Kind string `json:"type,omitempty"` Schedule string `json:"schedule,omitempty"` ConcurrencyPolicy string `json:"concurrencyPolicy,omitempty"` Suspend string `json:"suspend,omitempty"` Status string `json:"status,omitempty"` Deadline string `json:"deadline,omitempty"` HistoryLimit int64 `json:"historyLimit,omitempty"` LastScheduleTime string `json:"lastScheduleTime,omitempty"` CreateTime string `json:"createTime,omitempty"` }
type DataSource ¶
type DataSource struct { UserId string `json:"userid"` Username string `json:"username"` Namespace string `json:"namespace"` Name string `json:"name"` Type string `json:"type"` PvcName string `json:"pvc_name"` LocalPath string `json:"local_path"` Description string `json:"description"` CreateTime string `json:"create_time"` UpdateTime string `json:"update_time"` }
type DataSourceMap ¶
type DataSourceMap map[string]DataSource
type EvaluateJobInfo ¶
type EvaluateJobInfo struct { ID string `json:"id"` Name string `json:"name"` Namespace string `json:"namespace"` Image string `json:"image"` ModelName string `json:"modelName"` ModelVersion string `json:"modelVersion"` Metrics string `json:"metrics"` Status string `json:"jobStatus"` CreateTime string `json:"createTime"` ModifiedTime string `json:"ModifyTime"` }
func ConvertDMOEvaluateJobToEvaluateJobInfo ¶
func ConvertDMOEvaluateJobToEvaluateJobInfo(evaluateJob *dmo.EvaluateJob) EvaluateJobInfo
type HistoryJobStatistic ¶
type HistoryJobStatistic struct { UserID string `json:"userID"` // UserName can be JobUserName in JobInfo // or JobUserID iff JobUserName is empty in JobInfo // or "Anonymous" if JobUserName and JobUserID are both empty. UserName string `json:"userName"` Namespace string `json:"namespace"` // Total job count submmitted by this user. JobCount int32 `json:"jobCount"` // Job ratio submmited by this user. JobRatio float64 `json:"jobRatio"` }
HistoryJobStatistic used to record history job statistic.
type JobInfo ¶
type JobInfo struct { // 任务标识 Id string `json:"id"` // 任务名称 Name string `json:"name"` // 任务类型 JobType string `json:"jobType"` // 是否启用了TensorBoard EnableTensorboard bool `json:"enableTensorboard"` // 任务状态 JobStatus v1.JobConditionType `json:"jobStatus"` // 命名空间 Namespace string `json:"namespace"` // 创建时间 CreateTime string `json:"createTime"` // 结束时间 EndTime string `json:"endTime"` // 执行时长 DurationTime string `json:"durationTime"` // 部署域 DeployRegion string `json:"deployRegion"` // 退出事件列表 ExitedEvents []string `json:"exitedEvents"` // 任务规格列表 Specs []Spec `json:"specs"` //任务规格类型状态统计 SpecsReplicaStatuses map[string]*SpecReplicaStatus `json:"specsReplicaStatuses"` Resources string `json:"resources,omitempty"` JobConfig string `json:"jobConfig,omitempty"` JobUserID string `json:"jobUserId,omitempty"` JobUserName string `json:"jobUserName,omitempty"` JobResource JobResource `json:"jobResource,omitempty"` CreatedBy string `json:"createdBy,omitempty"` }
JobInfo job的基础模型 一期简单定义- 平铺
func ConvertDMOJobToJobInfo ¶
type JobResource ¶
type JobStatistics ¶
type JobStatistics struct { StartTime string `json:"startTime"` EndTime string `json:"endTime"` // Total job count submmitted from startTime to endTime. TotalJobCount int32 `json:"totalJobCount"` // Statistics of history jobs (All status), group by user. HistoryJobs []*HistoryJobStatistic `json:"historyJobs"` }
JobStatistics used to record job statistics submitted by users in current cluster.
type OAuthApp ¶
OAuthApp is the OAuth information struct
func NewOAuthApp ¶
NewOAuthApp create new OAuthApp Object
func (*OAuthApp) GetAppName ¶
GetAppName return the OAuthApp unique app name
func (*OAuthApp) GetDevConsoleHost ¶
func (*OAuthApp) GetDevConsoleHostWithRetry ¶
func (*OAuthApp) GetDisplayName ¶
GetDisplayName return the display name
func (*OAuthApp) GetRedirectURI ¶
return oauth redirect uri of
type OAuthInfo ¶
type OAuthInfo struct { // aliCloud third-part app id AppId string `json:"appId"` // aliCloud third-part app secret AppSecret string `json:"appSecret"` WebAppRedirectDomain string `json:"webAppRedirectDomain"` UserInfo UserInfo `json:"userInfo"` }
func GetOauthInfo ¶
GetOauthInfo from configmap
type Spec ¶
type Spec struct { // 名称 Name string `json:"name"` PodId string `json:"podId"` //任务类型 ReplicaType string `json:"replicaType"` // 容器IP ContainerIp string `json:"containerIp"` // 容器ID ContainerId string `json:"containerId"` // 宿主机IP HostIp string `json:"hostIp"` // 状态 Status corev1.PodPhase `json:"jobStatus"` // 创建时间 CreateTime string `json:"createTime"` // 开始时间 StartTime string `json:"startTime"` // 结束时间 EndTime string `json:"endTime"` // 执行时长 DurationTime string `json:"durationTime"` // 原因,目前只有失败情况下才有 Reason string `json:"reason,omitempty"` // 描述,目前只有失败情况下才有 Message string `json:"message,omitempty"` // 原因+描述,目前只有失败情况下才有 Remark string `json:"remark,omitempty"` // GPU卡数 GPU int `json:"gpu,omitempty"` }
Spec 任务规格模型
func ConvertDMOPodToJobSpec ¶
type SpecReplicaStatus ¶
type SpecReplicaStatus struct { // The number of actively running pods. Active int32 `json:"active"` // The number of pods which reached phase Succeeded. Succeeded int32 `json:"succeeded"` // The number of pods which reached phase Failed. Failed int32 `json:"failed"` // The number of pods which reached phase Stopped. Stopped int32 `json:"stopped"` }
SpecReplicaStatus 规格状态
type SubmitEvaluateJobArgs ¶
type SubmitEvaluateJobArgs struct {
dmo.SubmitEvaluateJobInfo `json:",inline"`
}
type SubmitJobArgs ¶
type SubmitJobArgs struct {
dmo.SubmitJobInfo `json:",inline"`
}
type UserInfo ¶
type UserInfo struct { // aliCloud main account id Aid string `json:"aid"` // aliCloud login account id Uid string `json:"uid"` // aliCloud display name Name string `json:"name"` // aliCloud login name LoginName string `json:"login_name"` // aliCloud ram login account Upn string `json:"upn"` // Namespaces specifies the authorized namespaces Namespaces []string `json:"namespaces"` }
type UserInfoMap ¶
Click to show internal directories.
Click to hide internal directories.