Documentation ¶
Index ¶
- Variables
- func CleanupK8sResource[T kruntime.Object](ctx context.Context, client AllowedCleanUpAPIInterface[T], name string)
- func CreateK8sObjectWithRetry[T kruntime.Object](ctx context.Context, createFunc K8sCreateFunc[T], obj T, ...) (result T)
- func DeleteK8sObjectWithRetry(ctx context.Context, deleteFunc K8sDeleteFunc, name string, ...)
- func GetK8sObjectWithRetry[T kruntime.Object](ctx context.Context, getFunc K8sGetFunc[T], name string, ...) (result T)
- func GetK8sPodLogsWithRetry(ctx context.Context, namespace string, name string, ...) (rawBody string)
- func ListK8sObjectWithRetry[T kruntime.Object](ctx context.Context, listFunc K8sListFunc[T], options metav1.ListOptions) (result T)
- func SaveScreenshot(wd selenium.WebDriver, e error)
- func UpdateK8sObjectWithRetry[T kruntime.Object](ctx context.Context, updateFunc K8sUpdateFunc[T], obj T, ...) (result T)
- type AllowedCleanUpAPIInterface
- type K8sCreateFunc
- type K8sDeleteFunc
- type K8sGetFunc
- type K8sListFunc
- type K8sUpdateFunc
- type Project
Constants ¶
This section is empty.
Variables ¶
var ( DefaultTimeout = 10 * time.Minute PollingInterval = 250 * time.Millisecond )
var (
DefaultEventuallyTimeout = 5 * time.Minute
)
Functions ¶
func CleanupK8sResource ¶
func CleanupK8sResource[T kruntime.Object]( ctx context.Context, client AllowedCleanUpAPIInterface[T], name string, )
CleanupK8sResource takes a client that knows how to issue a GET and DELETE call for a given resource. It then issues a delete request then and polls the API until the resource is no longer found.
Note: If the DELETE request receives a 404 we assume the resource has been cleaned up successfully.
func CreateK8sObjectWithRetry ¶
func CreateK8sObjectWithRetry[T kruntime.Object]( ctx context.Context, createFunc K8sCreateFunc[T], obj T, options metav1.CreateOptions, ) (result T)
CreateK8sObjectWithRetry takes a create function like clients.Kubernetes.CoreV1().Pods(namespace).Create and the parameters for it. It then makes the call with some retry logic and returns the result after asserting there were no errors.
func DeleteK8sObjectWithRetry ¶
func DeleteK8sObjectWithRetry( ctx context.Context, deleteFunc K8sDeleteFunc, name string, options metav1.DeleteOptions, )
DeleteK8sObjectWithRetry takes a delete function like clients.Kubernetes.CertificatesV1().CertificateSigningRequests().Delete and the parameters for it. It then makes the call with some retry logic.
func GetK8sObjectWithRetry ¶
func GetK8sObjectWithRetry[T kruntime.Object]( ctx context.Context, getFunc K8sGetFunc[T], name string, options metav1.GetOptions, ) (result T)
GetK8sObjectWithRetry takes a get function like clients.Kubernetes.CertificatesV1().CertificateSigningRequests().Get and the parameters for it. It then makes the call with some retry logic and returns the result after asserting there were no errors.
func GetK8sPodLogsWithRetry ¶
func GetK8sPodLogsWithRetry( ctx context.Context, namespace string, name string, options corev1.PodLogOptions, ) (rawBody string)
GetK8sPodLogsWithRetry gets the logs for the specified pod in the named namespace. It gets them with some retry logic and returns the raw string-ified body after asserting there were no errors.
func ListK8sObjectWithRetry ¶
func ListK8sObjectWithRetry[T kruntime.Object]( ctx context.Context, listFunc K8sListFunc[T], options metav1.ListOptions, ) (result T)
ListK8sObjectWithRetry takes a list function like clients.Kubernetes.CoreV1().Nodes().List and the parameters for it. It then makes the call with some retry logic and returns the result after asserting there were no errors.
func SaveScreenshot ¶
func UpdateK8sObjectWithRetry ¶
func UpdateK8sObjectWithRetry[T kruntime.Object]( ctx context.Context, updateFunc K8sUpdateFunc[T], obj T, options metav1.UpdateOptions, ) (result T)
UpdateK8sObjectWithRetry takes an update function and the parameters for it. It then makes the call with some retry logic and returns the result after asserting there were no errors.
Types ¶
type K8sCreateFunc ¶
type K8sDeleteFunc ¶
type K8sGetFunc ¶
type K8sListFunc ¶
type K8sUpdateFunc ¶
type Project ¶
type Project struct { Name string // contains filtered or unexported fields }
func BuildNewProject ¶
func BuildNewProject( ctx context.Context, cli kubernetes.Interface, projectClient projectclient.Interface, name string, ) Project
func (Project) VerifyProjectIsDeleted ¶
VerifyProjectIsDeleted verifies that the project does not exist by polling it.
Source Files ¶
- admin_portal.go
- adminapi.go
- adminapi_cluster_get.go
- adminapi_cluster_getlogs.go
- adminapi_cluster_list.go
- adminapi_cluster_update.go
- adminapi_csr.go
- adminapi_delete_managedresource.go
- adminapi_drainnode.go
- adminapi_hiveclusterdeployment.go
- adminapi_kubernetesobjects.go
- adminapi_redeployvm.go
- adminapi_resources.go
- adminapi_serialconsole.go
- cluster.go
- disk_encryption.go
- dns.go
- fips.go
- get.go
- helpers.go
- hive.go
- hive_manager.go
- list.go
- mimo_actuator.go
- monitor.go
- ocp_alerts.go
- ocp_cluster.go
- ocp_loadbalancer.go
- ocp_machine.go
- ocp_persistent_volume.go
- ocp_route.go
- operations.go
- operator.go
- setup.go
- update.go