Documentation ¶
Index ¶
- Variables
- func ListPods(pclient clientv1.PodInterface) (*v1.PodList, error)
- func LoadClientset(cfg *rest.Config) (*kubernetes.Clientset, error)
- func LoadInClusterConfig() (*rest.Config, error)
- func NewClusterConfig(kubeconfig string) (*rest.Config, error)
- func PodAddOrUpdateAnnotation(pod *v1.Pod, key, value string)
- func PodAddOrUpdateAnnotations(pod *v1.Pod, annotations map[string]string)
- func PodAddOrUpdateLabel(pod *v1.Pod, key, value string) error
- func PodAddOrUpdateLabels(pod *v1.Pod, labels map[string]string)
- func PodDeleteLabel(pod *v1.Pod, key string)
- func PodDeleteOldLabelsWithPrefix(pod *v1.Pod, prefix string, newLabels map[string]string)
- func PodRunningAndReady(pod *v1.Pod) (bool, error)
- func UpdatePod(pclient clientv1.PodInterface, pod *v1.Pod) error
- func ValidLabelKey(key string) (bool, error)
- func ValidLabelValue(value string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLabelKeyHostnameLength = errors.New("k8sutils: Invalid label key hostname length") ErrInvalidLabelKeyNameLength = errors.New("k8sutils: Invalid label key name length") ErrInvalidLabelValueLength = errors.New("k8sutils: Invalid label value length") TPRPollInterval = 3 * time.Second TPRPollTimeout = 30 * time.Second )
Functions ¶
func LoadClientset ¶
func LoadClientset(cfg *rest.Config) (*kubernetes.Clientset, error)
func LoadInClusterConfig ¶
func PodDeleteLabel ¶
func PodDeleteOldLabelsWithPrefix ¶
Delete the labels with the given prefix whose keys are not in newLabels or if the corresponding values are not equal.
func ValidLabelKey ¶
func ValidLabelValue ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.