Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatHPAName ¶
Types ¶
type HpaHandler ¶
type HpaHandler struct {
base.BaseHandler
}
func (*HpaHandler) GetObjectHpa ¶
func (h *HpaHandler) GetObjectHpa(c *gin.Context)
@Tags NOPROXY @Summary 获取HPA form @Description 获取HPA form @Accept json @Produce json @Param cluster path string true "cluster" @Param namespace path string true "namespace" @Param name query string true "name" @Param cluster query string true "cluster" @Param kind query string true "kind" @Success 200 {object} handlers.ResponseStruct{Data=hpaForm} "object" @Router /v1/noproxy/{cluster}/{namespace}/hpa [get] @Security JWT
func (*HpaHandler) RegistRouter ¶
func (h *HpaHandler) RegistRouter(rg *gin.RouterGroup)
func (*HpaHandler) SetObjectHpa ¶
func (h *HpaHandler) SetObjectHpa(c *gin.Context)
@Tags NOPROXY @Summary 设置HPA @Description 设置HPA @Accept json @Produce json @Param cluster path string true "cluster" @Param namespace path string true "namespace" @Param param body hpaForm true "表单" @Success 200 {object} handlers.ResponseStruct{Data=object} "object" @Router /v1/noproxy/{cluster}/{namespace}/hpa [post] @Security JWT
type PersistentVolumeClaimHandler ¶
type PersistentVolumeClaimHandler struct {
base.BaseHandler
}
func (*PersistentVolumeClaimHandler) Create ¶
func (h *PersistentVolumeClaimHandler) Create(c *gin.Context)
Create 恢复卷快照到新pvc @Tags NOPROXY @Summary 从快照恢复PVC @Description 从快照恢复PVC @Accept json @Produce json @Param cluster path string true "dev" @Param namespace path string true "default" @Param body body PersistentVolumeClaimRequest true "request body" @Success 200 {object} handlers.ResponseStruct{Data=v1.PersistentVolumeClaim} "PersistentVolumeClaim" @Failure 400 {object} handlers.ResponseStruct{} "" @Router /v1/noproxy/{cluster}/{namespace}/persistentvolumeclaim [post] @Security JWT
func (*PersistentVolumeClaimHandler) RegistRouter ¶
func (h *PersistentVolumeClaimHandler) RegistRouter(rg *gin.RouterGroup)
type VolumeSnapshotHandler ¶
type VolumeSnapshotHandler struct {
base.BaseHandler
}
func (*VolumeSnapshotHandler) RegistRouter ¶
func (h *VolumeSnapshotHandler) RegistRouter(rg *gin.RouterGroup)
func (*VolumeSnapshotHandler) Snapshot ¶
func (vh *VolumeSnapshotHandler) Snapshot(c *gin.Context)
Snapshot 执行对PVC的快照 @Tags NOPROXY @Summary 快照PVC @Description 执行对PVC的快照 @Accept json @Produce json @Param cluster path string true "dev" @Param namespace path string true "default" @Param body body VolumeSnapshotRequest true "request body" @Success 200 {object} handlers.ResponseStruct{Data=v1.VolumeSnapshot} "VolumeSnapshotDefinition" @Failure 400 {object} handlers.ResponseStruct{} "" @Router /v1/noproxy/{cluster}/{namespace}/volumesnapshot [post] @Security JWT
type VolumeSnapshotRequest ¶
type VolumeSnapshotRequest struct { // PersistentVolumeClaimName to snapshot PersistentVolumeClaimName string `binding:"required" json:"persistentVolumeClaimName,omitempty"` // Name of snapshot,如果不指定可自动生成。 Name string `json:"name,omitempty"` // VolumeSnapshotClass 若未指定则使用与 pvc storageclass 同名的 snapshotcass VolumeSnapshotClass string `json:"volumeSnapshotClass,omitempty"` }