v1

package
v0.0.0-...-32702a7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EndOfTransmission end
	EndOfTransmission = "\u0004"
)
View Source
const (
	TimedOutReason = "ProgressDeadlineExceeded"
)

Variables

View Source
var AppV1APIVersion = "apps/v1"
View Source
var BatchV1BetaVersion = "batch/v1beta1"
View Source
var CronJobKind = "CronJob"
View Source
var DeploymentKind = "Deployment"

Functions

func DeleteConfigmap

func DeleteConfigmap(c *gin.Context)

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 DeleteCronJob(c *gin.Context)

func DeleteDeployment

func DeleteDeployment(c *gin.Context)

func DeleteJob

func DeleteJob(c *gin.Context)

func DeletePod

func DeletePod(c *gin.Context)

func DeploymentDoAction

func DeploymentDoAction(c *gin.Context)

func DownloadPodContainerLog

func DownloadPodContainerLog(c *gin.Context)

func ForceUpdate

func ForceUpdate(deployment *appsv1.Deployment)

func GetConfigmap

func GetConfigmap(c *gin.Context)

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 GetCronJob(c *gin.Context)

func GetCronJobs

func GetCronJobs(c *gin.Context)

func GetDeployment

func GetDeployment(c *gin.Context)

@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 GetDeploymentPods(c *gin.Context)

func GetDeploymentStatus

func GetDeploymentStatus(c *gin.Context)

func GetDeployments

func GetDeployments(c *gin.Context)

@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 GetEvents

func GetEvents(c *gin.Context)

func GetJob

func GetJob(c *gin.Context)

func GetJobs

func GetJobs(c *gin.Context)

func GetNamespaces

func GetNamespaces(c *gin.Context)

func GetNodes

func GetNodes(c *gin.Context)

func GetPod

func GetPod(c *gin.Context)

@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 GetPodLog

func GetPodLog(c *gin.Context)

func GetPods

func GetPods(c *gin.Context)

@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 GetService(c *gin.Context)

func GetServices

func GetServices(c *gin.Context)

func PatchDeployment

func PatchDeployment(c *gin.Context)

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 PodWebSSH

func PodWebSSH(c *gin.Context)

func PostCronJob

func PostCronJob(c *gin.Context)

func PostDeployment

func PostDeployment(c *gin.Context)

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

func PutConfigmap(c *gin.Context)

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 PutCronJob(c *gin.Context)

func PutDeployment

func PutDeployment(c *gin.Context)

@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]

func WatchPods

func WatchPods(c *gin.Context)

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 CronJobUri struct {
	Namespace   string `uri:"namespace" binding:"required"`
	CronJobName string `uri:"cronjobName" binding:"required"`
}

type CronJobsQuery

type CronJobsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type DeploymentActionQuery

type DeploymentActionQuery struct {
	Action string `form:"action" binding:"required"`
}

type DeploymentBody

type DeploymentBody struct {
	Image    string `json:"image" form:"image"`
	Label    string `json:"label" form:"label"`
	Replicas string `json:"replicas" form:"replicas"`
}

type DeploymentQuery

type DeploymentQuery struct {
	Label string `json:"label" form:"label"`
}

type DeploymentUri

type DeploymentUri struct {
	Namespace      string `uri:"namespace" binding:"required"`
	DeploymentName string `uri:"deploymentName" binding:"required"`
}

type DeploymentsQuery

type DeploymentsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type DeploymentsUri

type DeploymentsUri struct {
	Cluster string `uri:"cluster" binding:"required"`
}

type EventsQuery

type EventsQuery struct {
	Namespace string `json:"namespace" form:"namespace" binding:"required"`
	Name      string `json:"name" form:"name" binding:"required"`
	Kind      string `json:"kind" form:"kind" binding:"required"`
	Uid       string `json:"uid" form:"uid" binding:"required"`
}

type ExtraPod

type ExtraPod struct {
	*corev1.Pod
	FormatStatus *k8s.PodFormatStatus `json:"formatStatus"`
}

type ExtraPodList

type ExtraPodList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []*ExtraPod `json:"items"`
}

type ExtraPodResp

type ExtraPodResp struct {
	Object *ExtraPod `json:"object"`
	Type   string    `json:"type"`
}

type JobUri

type JobUri struct {
	Namespace string `uri:"namespace" binding:"required"`
	JobName   string `uri:"jobName" binding:"required"`
}

type JobsQuery

type JobsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type PodLogQuery

type PodLogQuery struct {
	Container  string `form:"container" binding:"required"`
	Follow     string `form:"follow" binding:"required"`
	Previous   string `form:"previous" binding:"required"`
	Timestamps string `form:"timestamps" binding:"required"`
	TailLines  string `form:"tailLines" binding:"required"`
}

type PodQuery

type PodQuery struct {
}

type PodUri

type PodUri struct {
	Namespace string `uri:"namespace" binding:"required"`
	PodName   string `uri:"podName" binding:"required"`
}

type PodsQuery

type PodsQuery struct {
	Namespace string `form:"namespace"`
	Label     string `form:"label"`
}

type ServiceQuery

type ServiceQuery struct {
}

type ServiceUri

type ServiceUri struct {
	Namespace   string `uri:"namespace" binding:"required"`
	ServiceName string `uri:"serviceName" binding:"required"`
}

type ServicesQuery

type ServicesQuery struct {
	Namespace string `form:"namespace"`
}

type TerminalMessage

type TerminalMessage struct {
	Operation string `json:"operation"`
	Data      string `json:"data"`
	Rows      uint16 `json:"rows"`
	Cols      uint16 `json:"cols"`
}

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 (*WebTerminal) Read

func (t *WebTerminal) Read(p []byte) (n int, err error)

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

func (*WebTerminal) Write

func (t *WebTerminal) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL