Documentation
¶
Index ¶
- Constants
- func BuildAutoscalerContainer(autoscalerImage string) corev1.Container
- func BuildHeadServiceForRayService(ctx context.Context, rayService rayv1.RayService, rayCluster rayv1.RayCluster) (*corev1.Service, error)
- func BuildHeadlessServiceForRayCluster(rayCluster rayv1.RayCluster) *corev1.Service
- func BuildIngressForHeadService(ctx context.Context, cluster rayv1.RayCluster) (*networkingv1.Ingress, error)
- func BuildPod(ctx context.Context, podTemplateSpec corev1.PodTemplateSpec, ...) (aPod corev1.Pod)
- func BuildRole(cluster *rayv1.RayCluster) (*rbacv1.Role, error)
- func BuildRoleBinding(cluster *rayv1.RayCluster) (*rbacv1.RoleBinding, error)
- func BuildRouteForHeadService(cluster rayv1.RayCluster) (*routev1.Route, error)
- func BuildServeService(ctx context.Context, rayService rayv1.RayService, rayCluster rayv1.RayCluster, ...) (*corev1.Service, error)
- func BuildServeServiceForRayCluster(ctx context.Context, rayCluster rayv1.RayCluster) (*corev1.Service, error)
- func BuildServeServiceForRayService(ctx context.Context, rayService rayv1.RayService, rayCluster rayv1.RayCluster) (*corev1.Service, error)
- func BuildServiceAccount(cluster *rayv1.RayCluster) (*corev1.ServiceAccount, error)
- func BuildServiceForHeadPod(ctx context.Context, cluster rayv1.RayCluster, labels map[string]string, ...) (*corev1.Service, error)
- func CreatedClustersCounterInc(namespace string)
- func DefaultHeadPodTemplate(ctx context.Context, instance rayv1.RayCluster, headSpec rayv1.HeadGroupSpec, ...) corev1.PodTemplateSpec
- func DefaultWorkerPodTemplate(ctx context.Context, instance rayv1.RayCluster, ...) corev1.PodTemplateSpec
- func DeletedClustersCounterInc(namespace string)
- func FailedClustersCounterInc(namespace string)
- func GetDefaultSubmitterTemplate(rayClusterInstance *rayv1.RayCluster) corev1.PodTemplateSpec
- func GetHeadPort(headStartParams map[string]string) string
- func GetK8sJobCommand(rayJobInstance *rayv1.RayJob) ([]string, error)
- func GetMetadataJson(metadata map[string]string, rayVersion string) (string, error)
- func GetRayClusterHeadPod(ctx context.Context, reader client.Reader, instance *rayv1.RayCluster) (*corev1.Pod, error)
- func HeadServiceLabels(cluster rayv1.RayCluster) map[string]string
- func RayClusterAutoscalerRoleBindingNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
- func RayClusterAutoscalerRoleNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
- func RayClusterAutoscalerServiceAccountNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
- func RayClusterHeadServiceListOptions(instance *rayv1.RayCluster) []client.ListOption
- func RayClusterHeadlessServiceListOptions(instance *rayv1.RayCluster) []client.ListOption
- func RayClusterServeServiceNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
- func RayJobK8sJobNamespacedName(rayJob *rayv1.RayJob) types.NamespacedName
- func RayJobRayClusterNamespacedName(rayJob *rayv1.RayJob) types.NamespacedName
- func RayServiceActiveRayClusterNamespacedName(rayService *rayv1.RayService) types.NamespacedName
- func RayServicePendingRayClusterNamespacedName(rayService *rayv1.RayService) types.NamespacedName
- func RayServiceServeServiceNamespacedName(rayService *rayv1.RayService) types.NamespacedName
- func SuccessfulClustersCounterInc(namespace string)
- type AssociationOption
- type AssociationOptions
- func RayClusterAllPodsAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
- func RayClusterGroupPodsAssociationOptions(instance *rayv1.RayCluster, group string) AssociationOptions
- func RayClusterHeadPodsAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
- func RayClusterNetworkResourcesOptions(instance *rayv1.RayCluster) AssociationOptions
- func RayClusterRedisCleanupJobAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
- func RayClusterWorkerPodsAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
- func RayServiceRayClustersAssociationOptions(rayService *rayv1.RayService) AssociationOptions
Constants ¶
const ( RayLogVolumeName = "ray-logs" RayLogVolumeMountPath = "/tmp/ray" AutoscalerContainerName = "autoscaler" RayHeadContainer = "ray-head" ObjectStoreMemoryKey = "object-store-memory" // TODO (davidxia): should be a const in upstream ray-project/ray AllowSlowStorageEnvVar = "RAY_OBJECT_STORE_ALLOW_SLOW_STORAGE" // If set to true, kuberay auto injects an init container waiting for ray GCS. // If false, you will need to inject your own init container to ensure ray GCS is up before the ray workers start. EnableInitContainerInjectionEnvKey = "ENABLE_INIT_CONTAINER_INJECTION" NeuronCoreContainerResourceName = "aws.amazon.com/neuroncore" NeuronCoreRayResourceName = "neuron_cores" TPUContainerResourceName = "google.com/tpu" TPURayResourceName = "TPU" )
const IngressClassAnnotationKey = "kubernetes.io/ingress.class"
Variables ¶
This section is empty.
Functions ¶
func BuildAutoscalerContainer ¶
BuildAutoscalerContainer builds a Ray autoscaler container which can be appended to the head pod.
func BuildHeadServiceForRayService ¶
func BuildHeadServiceForRayService(ctx context.Context, rayService rayv1.RayService, rayCluster rayv1.RayCluster) (*corev1.Service, error)
BuildHeadServiceForRayService Builds the service for a pod. Currently, there is only one service that allows the worker nodes to connect to the head node. RayService controller updates the service whenever a new RayCluster serves the traffic.
func BuildHeadlessServiceForRayCluster ¶ added in v1.1.0
func BuildHeadlessServiceForRayCluster(rayCluster rayv1.RayCluster) *corev1.Service
BuildHeadlessService builds the headless service for workers in multi-host worker groups to communicate
func BuildIngressForHeadService ¶
func BuildIngressForHeadService(ctx context.Context, cluster rayv1.RayCluster) (*networkingv1.Ingress, error)
BuildIngressForHeadService Builds the ingress for head service dashboard. This is used to expose dashboard for external traffic.
func BuildPod ¶
func BuildPod(ctx context.Context, podTemplateSpec corev1.PodTemplateSpec, rayNodeType rayv1.RayNodeType, rayStartParams map[string]string, headPort string, enableRayAutoscaler bool, creatorCRDType utils.CRDType, fqdnRayIP string) (aPod corev1.Pod)
BuildPod a pod config
func BuildRole ¶
func BuildRole(cluster *rayv1.RayCluster) (*rbacv1.Role, error)
BuildRole creates a new Role for an RayCluster resource.
func BuildRoleBinding ¶
func BuildRoleBinding(cluster *rayv1.RayCluster) (*rbacv1.RoleBinding, error)
BuildRole
func BuildRouteForHeadService ¶ added in v1.0.0
func BuildRouteForHeadService(cluster rayv1.RayCluster) (*routev1.Route, error)
BuildRouteForHeadService Builds the Route (OpenShift) for head service dashboard. This is used to expose dashboard and remote submit service apis or external traffic.
func BuildServeService ¶ added in v1.1.0
func BuildServeService(ctx context.Context, rayService rayv1.RayService, rayCluster rayv1.RayCluster, isRayService bool) (*corev1.Service, error)
BuildServeService builds the service for head node and worker nodes who have healthy http proxy to serve traffics.
func BuildServeServiceForRayCluster ¶ added in v1.1.0
func BuildServeServiceForRayCluster(ctx context.Context, rayCluster rayv1.RayCluster) (*corev1.Service, error)
BuildServeServiceForRayCluster builds the serve service for Ray cluster.
func BuildServeServiceForRayService ¶
func BuildServeServiceForRayService(ctx context.Context, rayService rayv1.RayService, rayCluster rayv1.RayCluster) (*corev1.Service, error)
BuildServeServiceForRayService builds the serve service for RayService.
func BuildServiceAccount ¶
func BuildServiceAccount(cluster *rayv1.RayCluster) (*corev1.ServiceAccount, error)
BuildServiceAccount creates a new ServiceAccount for a head pod with autoscaler.
func BuildServiceForHeadPod ¶
func BuildServiceForHeadPod(ctx context.Context, cluster rayv1.RayCluster, labels map[string]string, annotations map[string]string) (*corev1.Service, error)
BuildServiceForHeadPod Builds the service for a pod. Currently, there is only one service that allows the worker nodes to connect to the head node.
func CreatedClustersCounterInc ¶
func CreatedClustersCounterInc(namespace string)
func DefaultHeadPodTemplate ¶
func DefaultHeadPodTemplate(ctx context.Context, instance rayv1.RayCluster, headSpec rayv1.HeadGroupSpec, podName string, headPort string) corev1.PodTemplateSpec
DefaultHeadPodTemplate sets the config values
func DefaultWorkerPodTemplate ¶
func DefaultWorkerPodTemplate(ctx context.Context, instance rayv1.RayCluster, workerSpec rayv1.WorkerGroupSpec, podName string, fqdnRayIP string, headPort string) corev1.PodTemplateSpec
DefaultWorkerPodTemplate sets the config values
func DeletedClustersCounterInc ¶
func DeletedClustersCounterInc(namespace string)
TODO: We don't handle the delete events in new reconciler mode, how to emit deletion metrics?
func FailedClustersCounterInc ¶
func FailedClustersCounterInc(namespace string)
func GetDefaultSubmitterTemplate ¶ added in v0.6.0
func GetDefaultSubmitterTemplate(rayClusterInstance *rayv1.RayCluster) corev1.PodTemplateSpec
GetDefaultSubmitterTemplate creates a default submitter template for the Ray job.
func GetHeadPort ¶
Get the port required to connect to the Ray cluster by worker nodes and drivers started within the cluster. For Ray >= 1.11.0 this is the GCS server port. For Ray < 1.11.0 it is the Redis port.
func GetK8sJobCommand ¶ added in v0.6.0
GetK8sJobCommand builds the K8s job command for the Ray job.
func GetMetadataJson ¶ added in v0.6.0
GetMetadataJson returns the JSON string of the metadata for the Ray job.
func GetRayClusterHeadPod ¶ added in v1.2.0
func GetRayClusterHeadPod(ctx context.Context, reader client.Reader, instance *rayv1.RayCluster) (*corev1.Pod, error)
GetRayClusterHeadPod gets a *corev1.Pod from a *rayv1.RayCluster. Note that it returns (nil, nil) in the case of no head pod exists.
func HeadServiceLabels ¶
func HeadServiceLabels(cluster rayv1.RayCluster) map[string]string
HeadServiceLabels returns the default labels for a cluster's head service.
func RayClusterAutoscalerRoleBindingNamespacedName ¶ added in v1.1.0
func RayClusterAutoscalerRoleBindingNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
func RayClusterAutoscalerRoleNamespacedName ¶ added in v1.1.0
func RayClusterAutoscalerRoleNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
func RayClusterAutoscalerServiceAccountNamespacedName ¶ added in v1.1.0
func RayClusterAutoscalerServiceAccountNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
func RayClusterHeadServiceListOptions ¶ added in v1.2.0
func RayClusterHeadServiceListOptions(instance *rayv1.RayCluster) []client.ListOption
func RayClusterHeadlessServiceListOptions ¶ added in v1.1.0
func RayClusterHeadlessServiceListOptions(instance *rayv1.RayCluster) []client.ListOption
func RayClusterServeServiceNamespacedName ¶ added in v1.1.0
func RayClusterServeServiceNamespacedName(instance *rayv1.RayCluster) types.NamespacedName
func RayJobK8sJobNamespacedName ¶ added in v1.1.0
func RayJobK8sJobNamespacedName(rayJob *rayv1.RayJob) types.NamespacedName
RayJobK8sJobNamespacedName is the only place to associate the RayJob with the submitter Kubernetes Job.
func RayJobRayClusterNamespacedName ¶ added in v1.1.0
func RayJobRayClusterNamespacedName(rayJob *rayv1.RayJob) types.NamespacedName
func RayServiceActiveRayClusterNamespacedName ¶ added in v1.1.0
func RayServiceActiveRayClusterNamespacedName(rayService *rayv1.RayService) types.NamespacedName
func RayServicePendingRayClusterNamespacedName ¶ added in v1.1.0
func RayServicePendingRayClusterNamespacedName(rayService *rayv1.RayService) types.NamespacedName
func RayServiceServeServiceNamespacedName ¶ added in v1.1.0
func RayServiceServeServiceNamespacedName(rayService *rayv1.RayService) types.NamespacedName
func SuccessfulClustersCounterInc ¶
func SuccessfulClustersCounterInc(namespace string)
Types ¶
type AssociationOption ¶ added in v1.1.0
type AssociationOption interface { client.ListOption client.DeleteAllOfOption }
type AssociationOptions ¶ added in v1.1.0
type AssociationOptions []AssociationOption
func RayClusterAllPodsAssociationOptions ¶ added in v1.1.0
func RayClusterAllPodsAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
func RayClusterGroupPodsAssociationOptions ¶ added in v1.1.0
func RayClusterGroupPodsAssociationOptions(instance *rayv1.RayCluster, group string) AssociationOptions
func RayClusterHeadPodsAssociationOptions ¶ added in v1.1.0
func RayClusterHeadPodsAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
func RayClusterNetworkResourcesOptions ¶ added in v1.3.0
func RayClusterNetworkResourcesOptions(instance *rayv1.RayCluster) AssociationOptions
func RayClusterRedisCleanupJobAssociationOptions ¶ added in v1.3.0
func RayClusterRedisCleanupJobAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
func RayClusterWorkerPodsAssociationOptions ¶ added in v1.1.0
func RayClusterWorkerPodsAssociationOptions(instance *rayv1.RayCluster) AssociationOptions
func RayServiceRayClustersAssociationOptions ¶ added in v1.2.0
func RayServiceRayClustersAssociationOptions(rayService *rayv1.RayService) AssociationOptions
func (AssociationOptions) ToDeleteOptions ¶ added in v1.1.0
func (list AssociationOptions) ToDeleteOptions() (options []client.DeleteAllOfOption)
func (AssociationOptions) ToListOptions ¶ added in v1.1.0
func (list AssociationOptions) ToListOptions() (options []client.ListOption)
func (AssociationOptions) ToMetaV1ListOptions ¶ added in v1.2.0
func (list AssociationOptions) ToMetaV1ListOptions() (options metav1.ListOptions)