Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteCRD(c *gin.Context)
- func DeleteConfigmap(c *gin.Context)
- func DeleteCronJob(c *gin.Context)
- func DeleteDeployment(c *gin.Context)
- func DeleteHorizontalPodAutoScaler(c *gin.Context)
- func DeleteJob(c *gin.Context)
- func DeletePod(c *gin.Context)
- func DeploymentDoAction(c *gin.Context)
- func DownloadPodContainerLog(c *gin.Context)
- func ForceUpdate(deployment *appsv1.Deployment)
- func GetCRD(c *gin.Context)
- func GetCRDs(c *gin.Context)
- func GetConfigmap(c *gin.Context)
- func GetConfigmapList(c *gin.Context)
- func GetCronJob(c *gin.Context)
- func GetCronJobs(c *gin.Context)
- func GetDeployment(c *gin.Context)
- func GetDeploymentCondition(status appsv1.DeploymentStatus, condType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition
- func GetDeploymentPods(c *gin.Context)
- func GetDeploymentStatus(c *gin.Context)
- func GetDeployments(c *gin.Context)
- func GetEvents(c *gin.Context)
- func GetHorizontalPodAutoScaler(c *gin.Context)
- func GetHorizontalPodAutoScalerList(c *gin.Context)
- func GetJob(c *gin.Context)
- func GetJobs(c *gin.Context)
- func GetNamespaces(c *gin.Context)
- func GetNodes(c *gin.Context)
- func GetPod(c *gin.Context)
- func GetPodLog(c *gin.Context)
- func GetPods(c *gin.Context)
- func GetService(c *gin.Context)
- func GetServices(c *gin.Context)
- func PatchDeployment(c *gin.Context)
- func PodWebSSH(c *gin.Context)
- func PostCRD(c *gin.Context)
- func PostConfigmap(c *gin.Context)
- func PostCronJob(c *gin.Context)
- func PostDeployment(c *gin.Context)
- func PostHorizontalPodAutoScaler(c *gin.Context)
- func PutCRD(c *gin.Context)
- func PutConfigmap(c *gin.Context)
- func PutCronJob(c *gin.Context)
- func PutDeployment(c *gin.Context)
- func PutHorizontalPodAutoScaler(c *gin.Context)
- func WatchPods(c *gin.Context)
- type CronJobBody
- type CronJobUri
- type CronJobsQuery
- type CronJobsUri
- type DeploymentActionQuery
- type DeploymentBody
- type DeploymentQuery
- type DeploymentUri
- type DeploymentsQuery
- type DeploymentsUri
- type EventsQuery
- type EventsUri
- type ExtraPod
- type ExtraPodList
- type ExtraPodResp
- type JobUri
- type JobsQuery
- type JobsUri
- type NamespacesUri
- type NodesUri
- type PodLogQuery
- type PodQuery
- type PodUri
- type PodsQuery
- type PodsUri
- type ServiceQuery
- type ServiceUri
- type ServicesQuery
- type ServicesUri
- type TerminalMessage
- type WebSSHQuery
- type WebTerminal
- func (t *WebTerminal) Close() error
- func (t *WebTerminal) Done()
- func (t *WebTerminal) Next() *remotecommand.TerminalSize
- func (t *WebTerminal) Read(p []byte) (n int, err error)
- func (t *WebTerminal) Stderr() io.Writer
- func (t *WebTerminal) Stdin() io.Reader
- func (t *WebTerminal) Stdout() io.Writer
- func (t *WebTerminal) Tty() bool
- func (t *WebTerminal) Write(p []byte) (n int, err error)
Constants ¶
const (
// EndOfTransmission end
EndOfTransmission = "\u0004"
)
const (
TimedOutReason = "ProgressDeadlineExceeded"
)
Variables ¶
var AppV1APIVersion = "apps/v1"
var BatchV1BetaVersion = "batch/v1beta1"
var CronJobKind = "CronJob"
var DeploymentKind = "Deployment"
Functions ¶
func DeleteCRD ¶
DeleteCRD @Summary 删除CRD自定义资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace}/{name} [delete]
func DeleteConfigmap ¶
DeleteConfigmap @Summary 删除Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps/{namespace}/{name} [delete]
func DeleteCronJob ¶
func DeleteDeployment ¶
func DeleteHorizontalPodAutoScaler ¶
DeleteHorizontalPodAutoScaler @Summary 删除弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers/{namespace}/{name} [delete]
func DeploymentDoAction ¶
func DownloadPodContainerLog ¶
func ForceUpdate ¶
func ForceUpdate(deployment *appsv1.Deployment)
func GetCRD ¶
GetCRD @Summary 获取CRD自定义资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace}/{name} [get]
func GetCRDs ¶
GetCRDs @Summary 获取CRD自定义资源列表 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace} [get]
func GetConfigmap ¶
GetConfigmap @Summary 获取Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps/{namespace}/{name} [get]
func GetConfigmapList ¶
GetConfigmapList @Summary 获取Configmap资源列表 @accept application/json @Param cluster path string true "Cluster" @Param param query metadata.CommonQueryParameter true "LabelSelector" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps [get]
func GetCronJob ¶
func GetCronJobs ¶
func GetDeployment ¶
@Summary 查看deployment @accept application/json @Produce application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param deploymentName path string true "DeploymentName" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments/{namespace}/{deploymentName} [get]
func GetDeploymentCondition ¶
func GetDeploymentCondition(status appsv1.DeploymentStatus, condType appsv1.DeploymentConditionType) *appsv1.DeploymentCondition
GetDeploymentCondition returns the condition with the provided type.
func GetDeploymentPods ¶
func GetDeploymentStatus ¶
func GetDeployments ¶
@Summary 查看deployment列表 @Produce json @Param cluster path string true "Cluster" @Param namespace query string true "Namespace" @Param label query string false "Label" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments [get]
func GetHorizontalPodAutoScaler ¶
GetHorizontalPodAutoScaler @Summary 获取弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers/{namespace}/{name} [get]
func GetHorizontalPodAutoScalerList ¶
GetHorizontalPodAutoScalerList @Summary 获取弹性伸缩资源列表 @accept application/json @Param cluster path string true "Cluster" @Param param query metadata.CommonQueryParameter true "LabelSelector" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers [get]
func GetNamespaces ¶
func GetService ¶
func GetServices ¶
func PatchDeployment ¶
PatchDeployment @Summary 批量更新deployment @Produce json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param deploymentName path string true "DeploymentName" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments/{namespace}/{deploymentName} [patch]
func PostCRD ¶
PostCRD @Summary 创建CRD资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource} [post]
func PostConfigmap ¶
PostConfigmap @Summary 创建Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps [post]
func PostCronJob ¶
func PostDeployment ¶
PostDeployment @Summary 创建deployment @accept application/json @Param cluster path string true "Cluster" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments [post]
func PostHorizontalPodAutoScaler ¶
PostHorizontalPodAutoScaler @Summary 创建弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers [post]
func PutCRD ¶
PutCRD @Summary 更新CRD自定义资源 @accept application/json @Param cluster path string true "Cluster" @Param group path string true "Group" @Param version path string true "Version" @Param resource path string true "Resource" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/crd/{group}/{version}/{resource}/{namespace}/{name} [put]
func PutConfigmap ¶
PutConfigmap @Summary 更新Configmap资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/configmaps/{namespace}/{name} [put]
func PutCronJob ¶
func PutDeployment ¶
@Summary 更新deployment @Produce json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param deploymentName path string true "DeploymentName" @Param RequestBody body v1.DeploymentBody true "RequestBody" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/deployments/{namespace}/{deploymentName} [put]
func PutHorizontalPodAutoScaler ¶
PutHorizontalPodAutoScaler @Summary 更新弹性伸缩资源 @accept application/json @Param cluster path string true "Cluster" @Param namespace path string true "Namespace" @Param name path string true "Name" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/{cluster}/horizontalpodautoscalers/{namespace}/{name} [put]
Types ¶
type CronJobBody ¶
type CronJobBody struct { Spec v1beta1.CronJobSpec `json:"spec" form:"spec"` Image string `json:"image" form:"image"` Label string `json:"label" form:"label"` }
type CronJobUri ¶
type CronJobsQuery ¶
type CronJobsUri ¶
type CronJobsUri struct {
Cluster string `uri:"cluster" binding:"required"`
}
type DeploymentActionQuery ¶
type DeploymentActionQuery struct {
Action string `form:"action" binding:"required"`
}
type DeploymentBody ¶
type DeploymentQuery ¶
type DeploymentQuery struct {
Label string `json:"label" form:"label"`
}
type DeploymentUri ¶
type DeploymentsQuery ¶
type DeploymentsUri ¶
type DeploymentsUri struct {
Cluster string `uri:"cluster" binding:"required"`
}
type EventsQuery ¶
type ExtraPod ¶
type ExtraPod struct { *corev1.Pod FormatStatus *k8s.PodFormatStatus `json:"formatStatus"` }
type ExtraPodList ¶
type ExtraPodResp ¶
type NamespacesUri ¶
type NamespacesUri struct {
Cluster string `uri:"cluster" binding:"required"`
}
type PodLogQuery ¶
type ServiceQuery ¶
type ServiceQuery struct { }
type ServiceUri ¶
type ServicesQuery ¶
type ServicesQuery struct {
Namespace string `form:"namespace"`
}
type ServicesUri ¶
type ServicesUri struct {
Cluster string `uri:"cluster" binding:"required"`
}
type TerminalMessage ¶
type WebSSHQuery ¶
type WebSSHQuery struct {
Container string `form:"container" binding:"required"`
}
type WebTerminal ¶
type WebTerminal struct {
// contains filtered or unexported fields
}
func (*WebTerminal) Close ¶
func (t *WebTerminal) Close() error
func (*WebTerminal) Done ¶
func (t *WebTerminal) Done()
func (*WebTerminal) Next ¶
func (t *WebTerminal) Next() *remotecommand.TerminalSize
func (*WebTerminal) Stderr ¶
func (t *WebTerminal) Stderr() io.Writer
func (*WebTerminal) Stdin ¶
func (t *WebTerminal) Stdin() io.Reader
func (*WebTerminal) Stdout ¶
func (t *WebTerminal) Stdout() io.Writer
func (*WebTerminal) Tty ¶
func (t *WebTerminal) Tty() bool