Documentation ¶
Index ¶
- Variables
- func CreateContainerElement(containerName csiv1.ImageType, image string, imagePullPolicy corev1.PullPolicy, ...) corev1.Container
- func CreateCustomResource(jsonData string, name, namespace string, resourceName string) (err error)
- func CreateNamespace(name string, client client.Client, reqLogger logr.Logger) (reconcile.Result, error)
- func GetDummyOwnerReferences(clusterRole *rbacv1.ClusterRole) []metav1.OwnerReference
- func GetKubeAPIServerVersion() (*version.Info, error)
- func GetOwnerReferences(driver csiv1.CSIDriver) []metav1.OwnerReference
- func GetRestClient(schemaObj *schema.GroupVersion) (*rest.RESTClient, error)
- func IsOpenshift() (bool, error)
- func IsStringInSlice(str string, slice []string) bool
- func JSONPrettyPrint(obj interface{}) string
- func NewNamespace(namespace string) *corev1.Namespace
- func Retry(backoff wait.Backoff, fn wait.ConditionFunc) error
- func WaitForCustomResourceToDelete(namespace string, resourceName string, restClient rest.RESTClient) (err error)
Constants ¶
This section is empty.
Variables ¶
var DefaultRetry = wait.Backoff{ Steps: 150, Duration: 4 * time.Second, Factor: 1.0, Jitter: 0.1, }
DefaultRetry is the default backoff for e2e tests.
Functions ¶
func CreateContainerElement ¶
func CreateContainerElement(containerName csiv1.ImageType, image string, imagePullPolicy corev1.PullPolicy, args []string, envs []corev1.EnvVar, volumeMounts []corev1.VolumeMount, securityContext *corev1.SecurityContext, command []string) corev1.Container
CreateContainerElement - Creates a generic container element for the given component of the given object
func CreateCustomResource ¶
CreateCustomResource - Creates Snapshot custom resource
func CreateNamespace ¶
func CreateNamespace(name string, client client.Client, reqLogger logr.Logger) (reconcile.Result, error)
CreateNamespace - Creates a namespace
func GetDummyOwnerReferences ¶
func GetDummyOwnerReferences(clusterRole *rbacv1.ClusterRole) []metav1.OwnerReference
GetDummyOwnerReferences - returns owner references
func GetKubeAPIServerVersion ¶
GetKubeAPIServerVersion - Returns the Kubernetes API server version
func GetOwnerReferences ¶
func GetOwnerReferences(driver csiv1.CSIDriver) []metav1.OwnerReference
GetOwnerReferences - Returns OwnerReferences for a specific driver
func GetRestClient ¶
func GetRestClient(schemaObj *schema.GroupVersion) (*rest.RESTClient, error)
GetRestClient - Returns a rest client to be used with k8s APIs
func IsOpenshift ¶
IsOpenshift - Returns a boolean which indicates if we are running in an OpenShift cluster
func IsStringInSlice ¶
IsStringInSlice - Checks if a given string is present in a slice
func JSONPrettyPrint ¶
func JSONPrettyPrint(obj interface{}) string
JSONPrettyPrint - Indent the json output
func NewNamespace ¶
NewNamespace - Returns a pointer to namespace resource
func Retry ¶
func Retry(backoff wait.Backoff, fn wait.ConditionFunc) error
Retry executes the provided function repeatedly, retrying until the function returns done = true, errors, or exceeds the given timeout.
func WaitForCustomResourceToDelete ¶
func WaitForCustomResourceToDelete(namespace string, resourceName string, restClient rest.RESTClient) (err error)
WaitForCustomResourceToDelete - wait for the CR to be deleted
Types ¶
This section is empty.