Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteConfigmap(c *gin.Context)
- func DeleteCronJob(c *gin.Context)
- func DeleteDeployment(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 GetConfigmap(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 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 PostCronJob(c *gin.Context)
- func PostDeployment(c *gin.Context)
- func PutConfigmap(c *gin.Context)
- func PutCronJob(c *gin.Context)
- func PutDeployment(c *gin.Context)
- func WatchPods(c *gin.Context)
- type CronJobBody
- type CronJobUri
- type CronJobsQuery
- type DeploymentActionQuery
- type DeploymentBody
- type DeploymentQuery
- type DeploymentUri
- type DeploymentsQuery
- type DeploymentsUri
- type EventsQuery
- type ExtraPod
- type ExtraPodList
- type ExtraPodResp
- type JobUri
- type JobsQuery
- type PodLogQuery
- type PodQuery
- type PodUri
- type PodsQuery
- type ServiceQuery
- type ServiceUri
- type ServicesQuery
- 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 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/configmaps/{namespace}/{name} [delete]
func DeleteCronJob ¶
func DeleteDeployment ¶
func DeploymentDoAction ¶
func DownloadPodContainerLog ¶
func ForceUpdate ¶
func ForceUpdate(deployment *appsv1.Deployment)
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/configmaps/{namespace}/{name} [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/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/deployments [get]
func GetNamespaces ¶
func GetPod ¶
@Summary 查看pod @accept application/json @Produce application/json @Param namespace path string true "Namespace" @Param deploymentName path string true "DeploymentName" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/pods/{namespace}/{podName} [get]
func GetPods ¶
@Summary 查看pod列表 @Produce json @Param namespace query string true "Namespace" @Param label query string false "Label" @Success 200 {object} app.Response @Failure 500 {object} app.Response @Router /k8s/pods [get]
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/deployments/{namespace}/{deploymentName} [patch]
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/deployments [post]
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/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/deployments/{namespace}/{deploymentName} [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 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 PodLogQuery ¶
type ServiceQuery ¶
type ServiceQuery struct { }
type ServiceUri ¶
type ServicesQuery ¶
type ServicesQuery struct {
Namespace string `form:"namespace"`
}
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