Documentation
¶
Overview ¶
Package tool provides tools for operator communicating with K8S cluster
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSvcResourceName ¶
Types ¶
type K8sClient ¶
type K8sClient struct { // kubernetes.Interface should be used instead of kubernets.Inteface for unit test (mocking) ClientSet kubernetes.Interface Config *rest.Config }
K8sClient is a struct which contains the kubernetes.Interface and *rest.Config.
func NewK8sClient ¶
NewK8sClient is to generate a K8s client for interacting with the K8S cluster.
func (*K8sClient) Exec ¶
func (client *K8sClient) Exec(namespace, podName, containerName string, command []string, stdin io.Reader) (*bytes.Buffer, *bytes.Buffer, error)
Exec enables operator to execute command in the pod's container in the K8S cluster. It returns the standard output and the standard error output.
Click to show internal directories.
Click to hide internal directories.