Documentation
¶
Index ¶
- func CheckComplianceStatus(g Gomega, managedPlc *unstructured.Unstructured, expectedCompliance string)
- func DoConfigPolicyMessageTest(clientHubDynamic dynamic.Interface, ...)
- func GetClusterLevelWithTimeout(clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, ...) *unstructured.Unstructured
- func GetComplianceState(managedPlc *unstructured.Unstructured) (result interface{})
- func GetFieldFromSecret(secret *unstructured.Unstructured, field string) (result interface{})
- func GetLastEvaluated(configPolicy *unstructured.Unstructured) (string, int64)
- func GetMatchingEvents(client kubernetes.Interface, namespace, objName, reasonRegex, msgRegex string, ...) []corev1.Event
- func GetMetrics(metricPatterns ...string) []string
- func GetServerVersion(clientManaged kubernetes.Interface) string
- func GetStatusMessage(managedPlc *unstructured.Unstructured) (result interface{})
- func GetWithTimeout(clientHubDynamic dynamic.Interface, gvr schema.GroupVersionResource, ...) *unstructured.Unstructured
- func Kubectl(args ...string)
- func KubectlDelete(args ...string)
- func ParseYaml(file string) *unstructured.Unstructured
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckComplianceStatus ¶ added in v0.15.0
func CheckComplianceStatus(g Gomega, managedPlc *unstructured.Unstructured, expectedCompliance string)
func DoConfigPolicyMessageTest ¶ added in v0.11.0
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 GetComplianceState ¶
func GetComplianceState(managedPlc *unstructured.Unstructured) (result interface{})
GetComplianceState parses status field of configurationPolicy to get compliance
func GetFieldFromSecret ¶
func GetFieldFromSecret(secret *unstructured.Unstructured, field string) (result interface{})
GetFieldFromSecret parses data field of secrets for the specified field
func GetLastEvaluated ¶ added in v0.7.0
func GetLastEvaluated(configPolicy *unstructured.Unstructured) (string, int64)
GetLastEvaluated parses the configuration policy and returns the status.lastEvaluated and status.lastEvaluatedGeneration fields. If they are not set, then default null values are returned.
func GetMatchingEvents ¶
func GetMetrics ¶ added in v0.10.0
GetMetrics execs into the config-policy-controller pod and curls the metrics endpoint, filters the response with the given patterns, and returns the value(s) for the matching metric(s).
func GetServerVersion ¶ added in v0.12.0
func GetServerVersion(clientManaged kubernetes.Interface) string
func GetStatusMessage ¶
func GetStatusMessage(managedPlc *unstructured.Unstructured) (result interface{})
GetStatusMessage parses status field to get message
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 KubectlDelete ¶ added in v0.15.0
func KubectlDelete(args ...string)
KubectlDelete executes a delete command, ignoring not found errors, and skipping the wait if not provided
func ParseYaml ¶
func ParseYaml(file string) *unstructured.Unstructured
ParseYaml read given yaml file and unmarshal it to &unstructured.Unstructured{}
Types ¶
This section is empty.