Documentation ¶
Index ¶
- func ExtractNamespacedName(object metav1.Object) types.NamespacedName
- func GetByName(ssetName string, expectName string) bool
- func GetCurrentPods(c k8s.Client, w *cachev1alpha1.Workload, label map[string]string, ...) ([]corev1.Pod, error)
- func GetPodIp(w *cachev1alpha1.Workload, podNames []string) []string
- func GetReplicas(sts appsv1.StatefulSet) int32
- func GetServiceUrl(w *cachev1alpha1.Workload, pods []corev1.Pod) (string, []string)
- func GetStatefulSetPods(c k8s.Client, w *cachev1alpha1.Workload, label map[string]string, ...) (*appsv1.StatefulSet, *corev1.PodList, error)
- func IsPodReady(pod corev1.Pod) bool
- func Joins(args ...string) string
- func PodName(ssetName string, ordinal int32) string
- func PodNames(sset appsv1.StatefulSet) []string
- func PodRunningAndReady(pod corev1.Pod) (bool, error)
- func RemoveStringInSlice(s string, slice []string) []string
- func StringInSlice(str string, list []string) bool
- func StringsInSlice(strings []string, slice []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractNamespacedName ¶
func ExtractNamespacedName(object metav1.Object) types.NamespacedName
ExtractNamespacedName returns an NamespacedName based on the given Object.
func GetCurrentPods ¶
func GetPodIp ¶
func GetPodIp(w *cachev1alpha1.Workload, podNames []string) []string
getReplsetAddrs returns a slice of replset host:port addresses
func GetReplicas ¶
func GetReplicas(sts appsv1.StatefulSet) int32
func GetServiceUrl ¶
func GetStatefulSetPods ¶
func IsPodReady ¶
IsAvailable checks if both conditions ContainersReady and PodReady of a Pod are true.
func PodNames ¶
func PodNames(sset appsv1.StatefulSet) []string
func PodRunningAndReady ¶
PodRunningAndReady returns whether a pod is running and each container has passed it's ready state.
func RemoveStringInSlice ¶
RemoveStringInSlice returns a new slice with all occurrences of s removed, keeping the given slice unmodified
func StringInSlice ¶
StringInSlice returns true if the given string is found in the provided slice, else returns false
func StringsInSlice ¶
StringsInSlice returns true if the given strings are found in the provided slice, else returns false
Types ¶
This section is empty.