Documentation
¶
Index ¶
- func RegisterActionRoutes(api *gin.RouterGroup)
- type ActionController
- func (nc *ActionController) BatchRestart(c *gin.Context)
- func (nc *ActionController) BatchRestore(c *gin.Context)
- func (nc *ActionController) BatchStop(c *gin.Context)
- func (nc *ActionController) Create(c *gin.Context)
- func (nc *ActionController) Event(c *gin.Context)
- func (nc *ActionController) HPA(c *gin.Context)
- func (nc *ActionController) History(c *gin.Context)
- func (nc *ActionController) HistoryRevisionDiff(c *gin.Context)
- func (nc *ActionController) Pause(c *gin.Context)
- func (nc *ActionController) Restart(c *gin.Context)
- func (nc *ActionController) Resume(c *gin.Context)
- func (nc *ActionController) Scale(c *gin.Context)
- func (nc *ActionController) Undo(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterActionRoutes ¶ added in v0.0.145
func RegisterActionRoutes(api *gin.RouterGroup)
Types ¶
type ActionController ¶ added in v0.0.145
type ActionController struct{}
func (*ActionController) BatchRestart ¶ added in v0.0.145
func (nc *ActionController) BatchRestart(c *gin.Context)
@Summary 批量重启Deployment @Security BearerAuth @Param cluster path string true "集群名称" @Param name_list body []string true "Deployment名称列表" @Param ns_list body []string true "命名空间列表" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/batch/restart [post]
func (*ActionController) BatchRestore ¶ added in v0.0.145
func (nc *ActionController) BatchRestore(c *gin.Context)
@Summary 批量恢复Deployment @Security BearerAuth @Param cluster path string true "集群名称" @Param name_list body []string true "Deployment名称列表" @Param ns_list body []string true "命名空间列表" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/batch/restore [post]
func (*ActionController) BatchStop ¶ added in v0.0.145
func (nc *ActionController) BatchStop(c *gin.Context)
@Summary 批量停止Deployment @Security BearerAuth @Param cluster path string true "集群名称" @Param name_list body []string true "Deployment名称列表" @Param ns_list body []string true "命名空间列表" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/batch/stop [post]
func (*ActionController) Create ¶ added in v0.0.145
func (nc *ActionController) Create(c *gin.Context)
@Summary 创建Deployment @Security BearerAuth @Param cluster path string true "集群名称" @Param body body object true "Deployment配置" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/create [post] 创建deployment
func (*ActionController) Event ¶ added in v0.0.145
func (nc *ActionController) Event(c *gin.Context)
@Summary 获取Deployment相关事件 @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/events/all [get] Event 显示deploy下所有的事件列表,包括deploy、rs、pod
func (*ActionController) HPA ¶ added in v0.0.145
func (nc *ActionController) HPA(c *gin.Context)
@Summary 获取Deployment的HPA信息 @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/hpa [get]
func (*ActionController) History ¶ added in v0.0.145
func (nc *ActionController) History(c *gin.Context)
@Summary 获取Deployment历史版本 @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/rollout/history [get]
func (*ActionController) HistoryRevisionDiff ¶ added in v0.0.145
func (nc *ActionController) HistoryRevisionDiff(c *gin.Context)
@Summary 获取Deployment版本差异 @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Param revision path string true "版本号" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/revision/{revision}/rollout/history [get]
func (*ActionController) Pause ¶ added in v0.0.145
func (nc *ActionController) Pause(c *gin.Context)
@Summary 暂停Deployment滚动更新 @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/rollout/pause [post]
func (*ActionController) Restart ¶ added in v0.0.145
func (nc *ActionController) Restart(c *gin.Context)
@Summary 重启单个Deployment @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/restart [post]
func (*ActionController) Resume ¶ added in v0.0.145
func (nc *ActionController) Resume(c *gin.Context)
@Summary 恢复Deployment滚动更新 @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/rollout/resume [post]
func (*ActionController) Scale ¶ added in v0.0.145
func (nc *ActionController) Scale(c *gin.Context)
@Summary 扩缩容Deployment @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Param replica path int true "副本数" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/scale/replica/{replica} [post]
func (*ActionController) Undo ¶ added in v0.0.145
func (nc *ActionController) Undo(c *gin.Context)
@Summary 回滚Deployment到指定版本 @Security BearerAuth @Param cluster path string true "集群名称" @Param ns path string true "命名空间" @Param name path string true "Deployment名称" @Param revision path string true "版本号" @Success 200 {object} string @Router /k8s/cluster/{cluster}/deploy/ns/{ns}/name/{name}/revision/{revision}/rollout/undo [post]