kubecontroller

package
v0.0.0-...-fc1dba9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeNamespace   = "namespaces"
	KubeDeployment  = "deployments"
	KubeStatefulset = "statefulsets"
	KubeDaemonset   = "daemonsets"
	KubePod         = "pods"
	KubeService     = "services"
	KubeIngress     = "ingresses"
)

Variables

This section is empty.

Functions

func NewKubeControllers

func NewKubeControllers(client *kubernetes.KubeClient, groupService service.GroupService) controller.Controller

func ProxyKubeAPIServer

func ProxyKubeAPIServer(config *rest.Config) gin.HandlerFunc

Types

type KubeController

type KubeController struct {
	// contains filtered or unexported fields
}

func (*KubeController) Create

func (kc *KubeController) Create(c *gin.Context)

@Summary Create kube resource @Description Create kube resource @Accept json @Produce json @Tags k8s @Security JWT @Param app body map[string]interface{} true "k8s json info" @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource [post]

func (*KubeController) Delete

func (kc *KubeController) Delete(c *gin.Context)

@Summary Delete kube resource @Description Delete kube resource @Accept json @Produce json @Tags k8s @Security JWT @Success 200 {object} common.Response @Router /api/v1/namespaces/:namespace/:resource/:name [delete]

func (*KubeController) Get

func (kc *KubeController) Get(c *gin.Context)

@Summary Get kube resource @Description Get kube resource @Accept json @Produce json @Tags k8s @Security JWT @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource/:name [get]

func (*KubeController) List

func (kc *KubeController) List(c *gin.Context)

@Summary List kube resource @Description List kube resource @Accept json @Produce json @Tags k8s @Security JWT @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource [get]

func (*KubeController) Name

func (kc *KubeController) Name() string

func (*KubeController) PodExec

func (kc *KubeController) PodExec(c *gin.Context)

func (*KubeController) PodLogs

func (kc *KubeController) PodLogs(c *gin.Context)

func (*KubeController) RegisterRoute

func (kc *KubeController) RegisterRoute(api *gin.RouterGroup)

func (*KubeController) Update

func (kc *KubeController) Update(c *gin.Context)

@Summary Update kube resource @Description Update kube resource @Accept json @Produce json @Tags k8s @Security JWT @Param app body map[string]interface{} true "k8s json info" @Success 200 {object} common.Response{data=map[string]interface{}} @Router /api/v1/namespaces/:namespace/:resource/:name [put]

type KubeResource

type KubeResource struct {
	Name         string
	Object       func() client.Object
	ObjectList   func() client.ObjectList
	IsNamespaced bool
}

Jump to

Keyboard shortcuts

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