Documentation ¶
Index ¶
- Variables
- func GetActivePodsByNodeName(k8sclient k8sclient.Interface, nodeName string) (*v1.PodList, error)
- func GetAllPodsByNodeName(k8sclient k8sclient.Interface, nodeName string) (*v1.PodList, error)
- func GetNode(k8sclient k8sclient.Interface, nodeName string) (node *v1.Node, err error)
- func GetNodeLabels(k8sclient k8sclient.Interface, nodeName string) (map[string]string, error)
- func GetPodByName(k8sclient k8sclient.Interface, name, namespace string) (*v1.Pod, error)
- func IsCompletePod(pod *v1.Pod) bool
- func IsFailedPod(pod *v1.Pod) bool
- func IsReady(node v1.Node) (ready bool)
- func IsSucceededPod(pod *v1.Pod) bool
- func KubeClient() error
- func KubeConfigClientSet(kubeConf string) (*kubernetes.Clientset, error)
- func RefreshPod(k8sclient k8sclient.Interface, pod v1.Pod) (*v1.Pod, error)
- func SetPodAnnotation(k8sclient k8sclient.Interface, pod *v1.Pod, key string, value string) error
- type Meta
- type Update
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Clientset *kubernetes.Clientset RestConfig *restclient.Config )
Global variables
Functions ¶
func GetActivePodsByNodeName ¶
GetActivePodsByNodeName gets pod with given Node name.
func GetAllPodsByNodeName ¶
GetAllPodsByNodeName gets pod with given Node name.
func GetNodeLabels ¶
func GetPodByName ¶
GetPodByName gets pod with given name and namespace of the pod.
func IsCompletePod ¶
IsCompletePod determines if the pod is complete
func IsReady ¶
IsReady checks if the node is ready If the node is ready,it returns True.Otherwise,it returns False.
func IsSucceededPod ¶
IsSucceededPod determines if the pod is Succeeded
func KubeClient ¶
func KubeClient() error
func KubeConfigClientSet ¶
func KubeConfigClientSet(kubeConf string) (*kubernetes.Clientset, error)
func RefreshPod ¶
RefreshPod takes an existing Pod object as an input, and re-reads it from the K8s API Returns the refreshed Pod descriptor in case of success, or an error
Types ¶
type Meta ¶
type Meta struct {
Annotations map[string]json.RawMessage `json:"annotations"`
}
Click to show internal directories.
Click to hide internal directories.