Documentation
¶
Index ¶
- Constants
- Variables
- func AppWrapper(t Test, namespace *corev1.Namespace, name string) func(g gomega.Gomega) *mcadv1beta1.AppWrapper
- func AppWrapperName(aw *mcadv1beta1.AppWrapper) string
- func AppWrapperState(aw *mcadv1beta1.AppWrapper) mcadv1beta1.AppWrapperState
- func AppWrappers(t Test, namespace *corev1.Namespace) func(g gomega.Gomega) []*mcadv1beta1.AppWrapper
- func ConditionStatus[T conditionType](conditionType T) func(any) corev1.ConditionStatus
- func CreateConfigMap(t Test, namespace string, content map[string][]byte) *corev1.ConfigMap
- func CreateOCMConnection(test Test) *ocmsdk.Connection
- func ExposeService(t Test, name string, namespace string, serviceName string, servicePort string) url.URL
- func ExposeServiceByIngress(t Test, name string, namespace string, serviceName string, servicePort string) url.URL
- func ExposeServiceByRoute(t Test, name string, namespace string, serviceName string, servicePort string) url.URL
- func GetCodeFlareSDKVersion() string
- func GetIngress(t Test, namespace, name string) *networkingv1.Ingress
- func GetInstascaleOcmSecret() (string, string)
- func GetJob(t Test, namespace, name string) *batchv1.Job
- func GetMachinePools(t Test, connection *ocmsdk.Connection) []*cmv1.MachinePool
- func GetMachineSets(t Test) ([]machinev1beta1.MachineSet, error)
- func GetMachines(t Test, machineSetName string) []machinev1beta1.Machine
- func GetOsdClusterId() (string, bool)
- func GetPodLogs(t Test, pod *corev1.Pod, options corev1.PodLogOptions) []byte
- func GetPods(t Test, namespace string, options metav1.ListOptions) []corev1.Pod
- func GetPyTorchImage() string
- func GetRayCluster(t Test, namespace, name string) *rayv1.RayCluster
- func GetRayImage() string
- func GetRayJob(t Test, namespace, name string) *rayv1.RayJob
- func GetRayJobAPIDetailsStatus(jobDetails *RayJobDetailsResponse) string
- func GetRayJobId(t Test, namespace, name string) string
- func GetRayVersion() string
- func GetRoute(t Test, namespace, name string) *routev1.Route
- func Ingress(t Test, namespace, name string) func(g gomega.Gomega) *networkingv1.Ingress
- func IsOpenShift(test Test) bool
- func Job(t Test, namespace, name string) func(g gomega.Gomega) *batchv1.Job
- func LoadBalancerIngresses(ingress *networkingv1.Ingress) []networkingv1.IngressLoadBalancerIngress
- func MachinePoolId(machinePool *cmv1.MachinePool) string
- func MachinePools(t Test, connection *ocmsdk.Connection) func(g gomega.Gomega) []*cmv1.MachinePool
- func MachineSetId(machineSet machinev1beta1.MachineSet) string
- func Machines(t Test, machineSetName string) func(g gomega.Gomega) []machinev1beta1.Machine
- func Ptr[T any](v T) *T
- func Raw(t Test, obj runtime.Object) runtime.RawExtension
- func RayCluster(t Test, namespace, name string) func(g gomega.Gomega) *rayv1.RayCluster
- func RayClusterState(cluster *rayv1.RayCluster) rayv1.ClusterState
- func RayJob(t Test, namespace, name string) func(g gomega.Gomega) *rayv1.RayJob
- func RayJobAPIDetails(t Test, rayClient RayClusterClient, jobID string) func(g gomega.Gomega) *RayJobDetailsResponse
- func RayJobStatus(job *rayv1.RayJob) rayv1.JobStatus
- func Route(t Test, namespace, name string) func(g gomega.Gomega) *routev1.Route
- func WriteRayJobAPILogs(t Test, rayClient RayClusterClient, jobID string)
- func WriteRayJobLogs(t Test, rayClient RayClusterClient, namespace, name string)
- func WriteToOutputDir(t Test, fileName string, fileType OutputType, data []byte)
- type Client
- type ClusterType
- type Option
- type OutputType
- type RayClusterClient
- type RayJobDetailsResponse
- type RayJobLogsResponse
- type RayJobResponse
- type RayJobSetup
- type T
- type Test
Constants ¶
View Source
const ( CodeFlareSDKVersion = "0.10.0" RayVersion = "2.5.0" RayImage = "rayproject/ray:2.5.0" )
View Source
const ( CodeFlareTestSdkVersion = "CODEFLARE_TEST_SDK_VERSION" CodeFlareTestRayVersion = "CODEFLARE_TEST_RAY_VERSION" CodeFlareTestRayImage = "CODEFLARE_TEST_RAY_IMAGE" CodeFlareTestPyTorchImage = "CODEFLARE_TEST_PYTORCH_IMAGE" // The testing output directory, to write output files into. CodeFlareTestOutputDir = "CODEFLARE_TEST_OUTPUT_DIR" // The namespace where a secret containing InstaScale OCM token is stored and the secret name. InstaScaleOcmSecret = "INSTASCALE_OCM_SECRET" // Cluster ID for OSD cluster used in tests, used for testing InstaScale OsdClusterID = "CLUSTERID" // Type of cluster test is run on ClusterTypeEnvVar = "CLUSTER_TYPE" )
View Source
const RayJobDefaultClusterSelectorKey = "ray.io/cluster"
Variables ¶
Functions ¶
func AppWrapper ¶
func AppWrapper(t Test, namespace *corev1.Namespace, name string) func(g gomega.Gomega) *mcadv1beta1.AppWrapper
func AppWrapperName ¶ added in v0.2.3
func AppWrapperName(aw *mcadv1beta1.AppWrapper) string
func AppWrapperState ¶
func AppWrapperState(aw *mcadv1beta1.AppWrapper) mcadv1beta1.AppWrapperState
func AppWrappers ¶ added in v0.2.3
func AppWrappers(t Test, namespace *corev1.Namespace) func(g gomega.Gomega) []*mcadv1beta1.AppWrapper
func ConditionStatus ¶
func ConditionStatus[T conditionType](conditionType T) func(any) corev1.ConditionStatus
func CreateConfigMap ¶
func CreateOCMConnection ¶
func CreateOCMConnection(test Test) *ocmsdk.Connection
func ExposeService ¶
func ExposeServiceByIngress ¶
func ExposeServiceByRoute ¶
func GetCodeFlareSDKVersion ¶
func GetCodeFlareSDKVersion() string
func GetIngress ¶ added in v0.2.0
func GetIngress(t Test, namespace, name string) *networkingv1.Ingress
func GetInstascaleOcmSecret ¶
func GetMachinePools ¶
func GetMachinePools(t Test, connection *ocmsdk.Connection) []*cmv1.MachinePool
func GetMachineSets ¶
func GetMachineSets(t Test) ([]machinev1beta1.MachineSet, error)
func GetMachines ¶
func GetMachines(t Test, machineSetName string) []machinev1beta1.Machine
func GetOsdClusterId ¶
func GetPodLogs ¶
func GetPyTorchImage ¶
func GetPyTorchImage() string
func GetRayCluster ¶ added in v0.1.0
func GetRayCluster(t Test, namespace, name string) *rayv1.RayCluster
func GetRayImage ¶
func GetRayImage() string
func GetRayJobAPIDetailsStatus ¶ added in v0.1.0
func GetRayJobAPIDetailsStatus(jobDetails *RayJobDetailsResponse) string
func GetRayJobId ¶ added in v0.2.0
func GetRayVersion ¶
func GetRayVersion() string
func IsOpenShift ¶
func LoadBalancerIngresses ¶ added in v0.2.0
func LoadBalancerIngresses(ingress *networkingv1.Ingress) []networkingv1.IngressLoadBalancerIngress
func MachinePoolId ¶
func MachinePoolId(machinePool *cmv1.MachinePool) string
func MachinePools ¶
func MachinePools(t Test, connection *ocmsdk.Connection) func(g gomega.Gomega) []*cmv1.MachinePool
func MachineSetId ¶
func MachineSetId(machineSet machinev1beta1.MachineSet) string
func RayCluster ¶ added in v0.1.0
func RayClusterState ¶ added in v0.1.0
func RayClusterState(cluster *rayv1.RayCluster) rayv1.ClusterState
func RayJobAPIDetails ¶ added in v0.1.0
func RayJobAPIDetails(t Test, rayClient RayClusterClient, jobID string) func(g gomega.Gomega) *RayJobDetailsResponse
func WriteRayJobAPILogs ¶ added in v0.1.0
func WriteRayJobAPILogs(t Test, rayClient RayClusterClient, jobID string)
func WriteRayJobLogs ¶
func WriteRayJobLogs(t Test, rayClient RayClusterClient, namespace, name string)
func WriteToOutputDir ¶
func WriteToOutputDir(t Test, fileName string, fileType OutputType, data []byte)
Types ¶
type ClusterType ¶
type ClusterType string
const ( OsdCluster ClusterType = "OSD" OcpCluster ClusterType = "OCP" HypershiftCluster ClusterType = "HYPERSHIFT" UndefinedCluster ClusterType = "UNDEFINED" )
func GetClusterType ¶
func GetClusterType(t Test) ClusterType
type RayClusterClient ¶ added in v0.1.0
type RayClusterClient interface { CreateJob(job *RayJobSetup) (*RayJobResponse, error) GetJobDetails(jobID string) (*RayJobDetailsResponse, error) GetJobLogs(jobID string) (string, error) }
func NewRayClusterClient ¶ added in v0.1.0
func NewRayClusterClient(dashboardEndpoint url.URL) RayClusterClient
type RayJobDetailsResponse ¶ added in v0.1.0
type RayJobDetailsResponse struct { JobID string `json:"job_id"` SubmissionID string `json:"submission_id"` Status string `json:"status"` }
func GetRayJobAPIDetails ¶ added in v0.1.0
func GetRayJobAPIDetails(t Test, rayClient RayClusterClient, jobID string) *RayJobDetailsResponse
type RayJobLogsResponse ¶ added in v0.1.0
type RayJobLogsResponse struct {
Logs string `json:"logs"`
}
type RayJobResponse ¶ added in v0.1.0
type RayJobSetup ¶ added in v0.1.0
type T ¶
func (*T) NewTestNamespace ¶
Click to show internal directories.
Click to hide internal directories.