ray

package
v0.1.0-audi.spark.inte... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HeadServiceName

func HeadServiceName(name string) string

HeadServiceName returns the name of the service that points to the ray head pod.

func HorizontalPodAutoscalerObjectMeta

func HorizontalPodAutoscalerObjectMeta(rc *dcv1alpha1.RayCluster) metav1.ObjectMeta

HorizontalPodAutoscalerObjectMeta returns the ObjectMeta object used to identify new HPA objects.

func InstanceObjectName

func InstanceObjectName(instance string, comp Component) string

InstanceObjectName returns the name that will be used to create most owned cluster resources.

func MetadataLabels

func MetadataLabels(rc *dcv1alpha1.RayCluster) map[string]string

MetadataLabels returns standard metadata for ray resources.

func MetadataLabelsWithComponent

func MetadataLabelsWithComponent(rc *dcv1alpha1.RayCluster, comp Component) map[string]string

MetadataLabelsWithComponent returns standard component metadata for ray resources.

func NewClusterNetworkPolicy

func NewClusterNetworkPolicy(rc *dcv1alpha1.RayCluster) *networkingv1.NetworkPolicy

NewClusterNetworkPolicy generates a network policy that allows all nodes within a single cluster to communicate on all ports.

func NewHeadClientNetworkPolicy

func NewHeadClientNetworkPolicy(rc *dcv1alpha1.RayCluster) *networkingv1.NetworkPolicy

NewHeadClientNetworkPolicy generates a network policy that allows client access to any pods that have been appointed with the configured client server labels.

func NewHeadDashboardNetworkPolicy

func NewHeadDashboardNetworkPolicy(rc *dcv1alpha1.RayCluster) *networkingv1.NetworkPolicy

NewHeadDashboardNetworkPolicy generates a network policy that allows dashboard access to any pods that have been appointed with configured dashboard labels.

func NewHeadService

func NewHeadService(rc *dcv1alpha1.RayCluster) *corev1.Service

NewHeadService creates a ClusterIP service that points to the head node. Dashboard port is exposed when enabled.

func NewHorizontalPodAutoscaler

func NewHorizontalPodAutoscaler(rc *dcv1alpha1.RayCluster) (*autoscalingv2beta2.HorizontalPodAutoscaler, error)

NewHorizontalPodAutoscaler generates an HPA that targets a RayCluster resource.

The metrics-server needs to be launched separately and the worker stateful set requires cpu resource requests in order for this object to have any effect.

func NewPodSecurityPolicyRBAC

func NewPodSecurityPolicyRBAC(rc *dcv1alpha1.RayCluster) (*rbacv1.Role, *rbacv1.RoleBinding)

NewPodSecurityPolicyRBAC generates the role and role binding required to use a pod security policy. The role is bound to the service account used by the ray cluster pods.

func NewServiceAccount

func NewServiceAccount(rc *dcv1alpha1.RayCluster) *corev1.ServiceAccount

NewServiceAccount generates a service account resource without API access.

func NewStatefulSet

func NewStatefulSet(rc *dcv1alpha1.RayCluster, comp Component) (*appsv1.StatefulSet, error)

func SelectorLabels

func SelectorLabels(rc *dcv1alpha1.RayCluster) map[string]string

SelectorLabels returns a resource selector clause for ray resources.

func SelectorLabelsWithComponent

func SelectorLabelsWithComponent(rc *dcv1alpha1.RayCluster, comp Component) map[string]string

SelectorLabelsWithComponent returns a resource component selector clause for ray resources.

Types

type Component

type Component string

Component is used to drive Kubernetes object generation for different ray types.

const (
	// ComponentNone indicates a generic ray resource.
	ComponentNone Component = "none"
	// ComponentHead indicates a ray head resource.
	ComponentHead Component = "head"
	// ComponentWorker indicates a ray worker resource.
	ComponentWorker Component = "worker"
	// ApplicationName defines the static name used to generate ray object metadata.
	ApplicationName = "ray"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL