Documentation ¶
Index ¶
- type K8S
- func (k *K8S) CreatePod(namespace string, name string, image string, labels map[string]string) (*v1.Pod, error)
- func (k *K8S) CreateService(namespace string, name string, typ string, ports []int32, ...) (*v1.Service, error)
- func (k *K8S) DeletePod(namespace string, name string) error
- func (k *K8S) DeleteService(namespace string, name string) error
- func (k *K8S) Deploy(ctx context.Context, workdir string, name string, ports []int32) error
- func (k *K8S) Destroy(ctx context.Context, name string) error
- func (k *K8S) GetPod(namespace string, name string) (*v1.Pod, error)
- func (k *K8S) GetStatus(ctx context.Context, name string) error
- func (k *K8S) ListPods() (*v1.PodList, error)
- func (k *K8S) Update(ctx context.Context, name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type K8S ¶
type K8S struct {
*kubernetes.Clientset
}
K8S client
func (*K8S) CreatePod ¶
func (k *K8S) CreatePod( namespace string, name string, image string, labels map[string]string, ) (*v1.Pod, error)
CreatePod create a pod
func (*K8S) CreateService ¶
func (k *K8S) CreateService( namespace string, name string, typ string, ports []int32, podsLabels map[string]string, ) (*v1.Service, error)
CreateService create a service
func (*K8S) DeleteService ¶
DeleteService a service
Click to show internal directories.
Click to hide internal directories.