Documentation ¶
Index ¶
- func GeneratePldStatus(_ string, _ string, clusters ...string) *clusterv1beta1.PlacementDecisionStatus
- func GeneratePlrStatus(clusters ...string) *appsv1.PlacementRuleStatus
- func GetClusterLevelWithTimeout(clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, ...) *unstructured.Unstructured
- func GetMatchingEvents(client kubernetes.Interface, namespace, objName, reasonRegex, msgRegex string, ...) []corev1.Event
- func GetMetrics(metricPatterns ...string) []string
- func GetWithTimeout(clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, ...) *unstructured.Unstructured
- func Kubectl(args ...string)
- func KubectlWithOutput(args ...string) (string, error)
- func ListWithTimeout(clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, ...) *unstructured.UnstructuredList
- func ListWithTimeoutByNamespace(clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, ...) *unstructured.UnstructuredList
- func MetricsLines(pattern string) (string, error)
- func ParseYaml(file string) *unstructured.Unstructured
- func Pause(s uint)
- func RemovePolicyTemplateDBAnnotations(plc *unstructured.Unstructured) error
- func SemanticEqual(expected interface{}) types.GomegaMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePldStatus ¶
func GeneratePldStatus( _ string, _ string, clusters ...string, ) *clusterv1beta1.PlacementDecisionStatus
GeneratePldStatus generate pld status with given clusters
func GeneratePlrStatus ¶
func GeneratePlrStatus(clusters ...string) *appsv1.PlacementRuleStatus
GeneratePlrStatus generate plr status with given clusters
func GetClusterLevelWithTimeout ¶
func GetClusterLevelWithTimeout( clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, name string, wantFound bool, timeout int, ) *unstructured.Unstructured
GetClusterLevelWithTimeout keeps polling to get the object for timeout seconds until wantFound is met (true for found, false for not found)
func GetMatchingEvents ¶ added in v0.12.0
func GetMetrics ¶
GetMetrics execs into the propagator pod and curls the metrics endpoint, filters the response with the given patterns, and returns the value(s) for the matching metric(s).
func GetWithTimeout ¶
func GetWithTimeout( clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, name, namespace string, wantFound bool, timeout int, ) *unstructured.Unstructured
GetWithTimeout keeps polling to get the object for timeout seconds until wantFound is met (true for found, false for not found)
func KubectlWithOutput ¶
KubectlWithOutput execute kubectl cli and return output and error
func ListWithTimeout ¶
func ListWithTimeout( clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, opts metav1.ListOptions, size int, wantFound bool, timeout int, ) *unstructured.UnstructuredList
ListWithTimeout keeps polling to list the object for timeout seconds until wantFound is met (true for found, false for not found)
func ListWithTimeoutByNamespace ¶
func ListWithTimeoutByNamespace( clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, opts metav1.ListOptions, ns string, size int, wantFound bool, timeout int, ) *unstructured.UnstructuredList
ListWithTimeoutByNamespace keeps polling to list the object for timeout seconds until wantFound is met (true for found, false for not found)
func MetricsLines ¶ added in v0.12.0
MetricsLines execs into the propagator pod and curls the metrics endpoint, and returns lines that match the pattern.
func ParseYaml ¶
func ParseYaml(file string) *unstructured.Unstructured
ParseYaml read given yaml file and unmarshal it to &unstructured.Unstructured{}
func RemovePolicyTemplateDBAnnotations ¶ added in v0.13.0
func RemovePolicyTemplateDBAnnotations(plc *unstructured.Unstructured) error
func SemanticEqual ¶
func SemanticEqual(expected interface{}) types.GomegaMatcher
Types ¶
This section is empty.