Documentation ¶
Index ¶
- Variables
- func ExecInNamespacePodContainer(namespace, podName, containerName string, cmd []string) error
- func ExecIntoDockerContainer(containerName string, cmds []string) error
- func IsK3d() (bool, error)
- func RootIntoNamespacePodContainer(namespace, podName, containerName, shell string) error
- func RootIntoPodContainer(podContainerName string) error
- func RunInNodeOfPod(pod v1.Pod, cmds []string) error
- type K8sClient
- func (k8s *K8sClient) DeletePod(pod v1.Pod) error
- func (k8s *K8sClient) GetAllPods() ([]*v1.Pod, error)
- func (k8s *K8sClient) GetAllRunningPods() ([]*v1.Pod, error)
- func (k8s *K8sClient) GetHostPathOfVolumeMount(namespace string, volumeMount v1.Volume) (string, error)
- func (k8s *K8sClient) GetLogsOfPod(pod v1.Pod) (string, error)
- func (k8s *K8sClient) GetNamespace() string
- func (k8s *K8sClient) GetNodeOfPod(pod v1.Pod) (*v1.Node, error)
- func (k8s *K8sClient) GetNodes() ([]v1.Node, error)
- func (k8s *K8sClient) GetPV(volumeName string) (*v1.PersistentVolume, error)
- func (k8s *K8sClient) GetPVC(namespace, claimName string) (*v1.PersistentVolumeClaim, error)
- func (k8s *K8sClient) GetPodByNameInCurrentNamespace(name string) (*v1.Pod, error)
- func (k8s *K8sClient) GetPodByNamespaceAndName(namespace, name string) (*v1.Pod, error)
- func (k8s *K8sClient) GetPodsByImage(imageName string, exactMatch bool) ([]*v1.Pod, error)
- func (k8s *K8sClient) GetPodsByNamespace(namespace string, requireRunning bool) ([]*v1.Pod, error)
- func (k8s *K8sClient) GetRunningPodsInCurrentNamespace() ([]*v1.Pod, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( K8s = &K8sClient{} Ctx = context.Background() )
Functions ¶
func ExecIntoDockerContainer ¶
func RootIntoPodContainer ¶
Types ¶
type K8sClient ¶
type K8sClient struct {
Clientset *kubernetes.Clientset
}
func (*K8sClient) GetHostPathOfVolumeMount ¶
func (*K8sClient) GetNamespace ¶
func (*K8sClient) GetPV ¶
func (k8s *K8sClient) GetPV(volumeName string) (*v1.PersistentVolume, error)
func (*K8sClient) GetPVC ¶
func (k8s *K8sClient) GetPVC(namespace, claimName string) (*v1.PersistentVolumeClaim, error)
func (*K8sClient) GetPodByNameInCurrentNamespace ¶
func (*K8sClient) GetPodByNamespaceAndName ¶
func (*K8sClient) GetPodsByImage ¶
func (*K8sClient) GetPodsByNamespace ¶
Click to show internal directories.
Click to hide internal directories.