Documentation
¶
Index ¶
- func AcquireLease(ctx context.Context, clientset *kubernetes.Clientset, ...) (bool, error)
- func Contains(slice []string, item string) bool
- func EncodePrivateKey(key interface{}) ([]byte, error)
- func EncodeX509Certificate(crt *x509.Certificate) []byte
- func GetClientKubeWithConf(config *rest.Config) (*kubernetes.Clientset, error)
- func GetFreeNodeports(host string, n int) ([]int, error)
- func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
- func GetPodConditionFromList(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
- func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
- func GetPublicIPKubernetes(clientSet *kubernetes.Clientset) (string, error)
- func GetPublicIPsKubernetes(clientSet *kubernetes.Clientset) ([]string, error)
- func IsPodReadyConditionTrue(status corev1.PodStatus) bool
- func ParseCRL(crlBytes []byte) (*pkix.CertificateList, error)
- func ParseECDSAPrivateKey(contents []byte) (*ecdsa.PrivateKey, error)
- func ParseK8sYaml(fileR []byte) []runtime.Object
- func ParseX509Certificate(contents []byte) (*x509.Certificate, error)
- func ReleaseLease(ctx context.Context, clientset *kubernetes.Clientset, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcquireLease ¶ added in v1.13.0
func AcquireLease(ctx context.Context, clientset *kubernetes.Clientset, leaseName, namespace, holderIdentity string, ttlSeconds int32) (bool, error)
AcquireLease tries to acquire a Lease for distributed locking. Returns true if lock acquired, false if not.
func EncodePrivateKey ¶
func EncodeX509Certificate ¶
func EncodeX509Certificate(crt *x509.Certificate) []byte
func GetClientKubeWithConf ¶
func GetClientKubeWithConf(config *rest.Config) (*kubernetes.Clientset, error)
func GetPodCondition ¶ added in v1.11.0
func GetPodCondition(status *corev1.PodStatus, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
GetPodCondition extracts the provided condition from the given status and returns that. Returns nil and -1 if the condition is not present, and the index of the located condition.
func GetPodConditionFromList ¶ added in v1.11.0
func GetPodConditionFromList(conditions []corev1.PodCondition, conditionType corev1.PodConditionType) (int, *corev1.PodCondition)
GetPodConditionFromList extracts the provided condition from the given list of condition and returns the index of the condition and the condition. Returns -1 and nil if the condition is not present.
func GetPodReadyCondition ¶ added in v1.11.0
func GetPodReadyCondition(status corev1.PodStatus) *corev1.PodCondition
GetPodReadyCondition extracts the pod ready condition from the given status and returns that. Returns nil if the condition is not present.
func GetPublicIPKubernetes ¶
func GetPublicIPKubernetes(clientSet *kubernetes.Clientset) (string, error)
func GetPublicIPsKubernetes ¶ added in v1.2.1
func GetPublicIPsKubernetes(clientSet *kubernetes.Clientset) ([]string, error)
func IsPodReadyConditionTrue ¶ added in v1.11.0
IsPodReadyConditionTrue returns true if a pod is ready; false otherwise.
func ParseECDSAPrivateKey ¶
func ParseECDSAPrivateKey(contents []byte) (*ecdsa.PrivateKey, error)
func ParseK8sYaml ¶
func ParseX509Certificate ¶
func ParseX509Certificate(contents []byte) (*x509.Certificate, error)
func ReleaseLease ¶ added in v1.13.0
func ReleaseLease(ctx context.Context, clientset *kubernetes.Clientset, leaseName, namespace, holderIdentity string) error
ReleaseLease releases the Lease if held by holderIdentity
Types ¶
This section is empty.