Documentation ¶
Index ¶
- type KubeService
- func (k *KubeService) Create(ctx context.Context, name string) error
- func (k *KubeService) Delete(ctx context.Context, name string) error
- func (k *KubeService) Exist(ctx context.Context, name string) (bool, error)
- func (k *KubeService) Get(ctx context.Context, name string) (*v1.Namespace, error)
- func (k *KubeService) GetEndpoints(ctx context.Context, namespace string) (*v1.EndpointsList, error)
- func (k *KubeService) GetPods(ctx context.Context, namespace string) (*v1.PodList, error)
- func (k *KubeService) Update(ctx context.Context, namespace string, labelsToUpdate map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubeService ¶
type KubeService struct {
ClientSet *kubernetes.Clientset
}
KubeService includes the kube context
func NewService ¶
func NewService(kubecontext *string) (*KubeService, error)
NewService factory method to create a new Kubernete sertvice to interact with crud methods
func (*KubeService) Create ¶
func (k *KubeService) Create(ctx context.Context, name string) error
Create creates a namespace in k8
func (*KubeService) Delete ¶
func (k *KubeService) Delete(ctx context.Context, name string) error
Delete deletes a namespace
func (*KubeService) GetEndpoints ¶
func (k *KubeService) GetEndpoints(ctx context.Context, namespace string) (*v1.EndpointsList, error)
GetEndpoints returns an endpoints list
Click to show internal directories.
Click to hide internal directories.