Documentation
¶
Index ¶
- func CleanupAndWait(ctx context.Context, c client.Client, objs ...client.Object) error
- func CleanupWithLabelAndWait(ctx context.Context, c client.Client, labelSelector labels.Selector, ...) error
- func CreateResourceIfNotExist(ctx context.Context, c client.Client, obj client.Object) error
- func ForceObjectReconcileWithAnnotation(ctx context.Context, c client.Client, obj client.Object) error
- func GetFakeKamajiClusterSecretFromEnvtest(cluster provisioningv1.DPUCluster, cfg *rest.Config) (*corev1.Secret, error)
- func GetTestDPUCluster(ns, name string) provisioningv1.DPUCluster
- func GetTestLabels() map[string]string
- func ResolveBFBImageURL(bfbURL string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupAndWait ¶
CleanupAndWait deletes an object and waits for it to be removed before exiting.
func CleanupWithLabelAndWait ¶
func CleanupWithLabelAndWait(ctx context.Context, c client.Client, labelSelector labels.Selector, resources ...client.ObjectList) error
CleanupWithLabelAndWait creates a list ob objects with certain labels and deletes them. After deletion, it waits to be removed.
func CreateResourceIfNotExist ¶
CreateResourceIfNotExist creates a resource if it doesn't exist
func ForceObjectReconcileWithAnnotation ¶
func ForceObjectReconcileWithAnnotation(ctx context.Context, c client.Client, obj client.Object) error
ForceObjectReconcileWithAnnotation adds patches the passed object with an annotation to force it to be reconciled.
func GetFakeKamajiClusterSecretFromEnvtest ¶
func GetFakeKamajiClusterSecretFromEnvtest(cluster provisioningv1.DPUCluster, cfg *rest.Config) (*corev1.Secret, error)
GetFakeKamajiClusterSecretFromEnvtest creates a kamaji secret using the envtest information to simulate that we have a kamaji cluster. In reality, this is the same envtest Kubernetes API.
func GetTestDPUCluster ¶
func GetTestDPUCluster(ns, name string) provisioningv1.DPUCluster
func GetTestLabels ¶
func ResolveBFBImageURL ¶
ResolveBFBImageURL resolves a BFB image URL to a real file path. On our test environment, we can access NFS files via HTTP. To be able to test the latest BFB image, we need to resolve the URL to a real file path.
Types ¶
This section is empty.