Documentation ¶
Overview ¶
Package tools implements tools to work with kubeernetes.
Index ¶
- func BuildConfig(kubeconfig, namespace string) (k *rest.Config, ns string, err error)
- func CSINodes(ctx context.Context, kclient *clientkubernetes.Clientset, csiDriverName string) ([]string, error)
- func CondonNodes(ctx context.Context, kclient *clientkubernetes.Clientset, nodes []string) ([]string, error)
- func PVCPodUsage(ctx context.Context, clientset *clientkubernetes.Clientset, ...) (pods []string, node string, err error)
- func PVCResources(ctx context.Context, clientset *clientkubernetes.Clientset, ...) (*corev1.PersistentVolumeClaim, *corev1.PersistentVolume, error)
- func PVWaitDelete(ctx context.Context, clientset *clientkubernetes.Clientset, pvName string) error
- func ProxmoxVMID(ctx context.Context, kclient clientkubernetes.Interface, nodeName string) (int, string, error)
- func UncondonNodes(ctx context.Context, kclient *clientkubernetes.Clientset, nodes []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConfig ¶
BuildConfig returns a kubernetes client configuration and namespace.
func CSINodes ¶
func CSINodes(ctx context.Context, kclient *clientkubernetes.Clientset, csiDriverName string) ([]string, error)
CSINodes returns a list of nodes that have the specified CSI driver name.
func CondonNodes ¶
func CondonNodes(ctx context.Context, kclient *clientkubernetes.Clientset, nodes []string) ([]string, error)
CondonNodes condones the specified nodes.
func PVCPodUsage ¶
func PVCPodUsage(ctx context.Context, clientset *clientkubernetes.Clientset, namespace, pvcName string) (pods []string, node string, err error)
PVCPodUsage returns the list of pods and the node that are using the specified PersistentVolumeClaim.
func PVCResources ¶
func PVCResources(ctx context.Context, clientset *clientkubernetes.Clientset, namespace, pvcName string) (*corev1.PersistentVolumeClaim, *corev1.PersistentVolume, error)
PVCResources returns the PersistentVolumeClaim and PersistentVolume resources.
func PVWaitDelete ¶
PVWaitDelete waits for the specified PersistentVolume to be deleted.
func ProxmoxVMID ¶
func ProxmoxVMID(ctx context.Context, kclient clientkubernetes.Interface, nodeName string) (int, string, error)
ProxmoxVMID returns the Proxmox VM ID from the specified kubernetes node name.
func UncondonNodes ¶
UncondonNodes uncondones the specified nodes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.