Documentation ¶
Index ¶
- func AddGlobalLabels(labels map[string]string, globalLabels map[string]string) map[string]string
- func HeadlessHeadServiceName(name string) string
- func HeadlessWorkerServiceName(name string) string
- func HorizontalPodAutoscalerObjectMeta(rc *dcv1alpha1.RayCluster) metav1.ObjectMeta
- func InstanceObjectName(instance string, comp Component) string
- func MetadataLabels(rc *dcv1alpha1.RayCluster) map[string]string
- func MetadataLabelsWithComponent(rc *dcv1alpha1.RayCluster, comp Component) map[string]string
- func NewClientService(rc *dcv1alpha1.RayCluster) *corev1.Service
- func NewClusterNetworkPolicy(rc *dcv1alpha1.RayCluster) *networkingv1.NetworkPolicy
- func NewHeadClientNetworkPolicy(rc *dcv1alpha1.RayCluster) *networkingv1.NetworkPolicy
- func NewHeadDashboardNetworkPolicy(rc *dcv1alpha1.RayCluster) *networkingv1.NetworkPolicy
- func NewHeadlessHeadService(rc *dcv1alpha1.RayCluster) *corev1.Service
- func NewHeadlessWorkerService(rc *dcv1alpha1.RayCluster) *corev1.Service
- func NewHorizontalPodAutoscaler(rc *dcv1alpha1.RayCluster) (*autoscalingv2beta2.HorizontalPodAutoscaler, error)
- func NewPodSecurityPolicyRBAC(rc *dcv1alpha1.RayCluster) (*rbacv1.Role, *rbacv1.RoleBinding)
- func NewServiceAccount(rc *dcv1alpha1.RayCluster) *corev1.ServiceAccount
- func NewStatefulSet(rc *dcv1alpha1.RayCluster, comp Component, istioEnabled bool) (*appsv1.StatefulSet, error)
- func SelectorLabels(rc *dcv1alpha1.RayCluster) map[string]string
- func SelectorLabelsWithComponent(rc *dcv1alpha1.RayCluster, comp Component) map[string]string
- type Component
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGlobalLabels ¶ added in v0.4.3
func HeadlessHeadServiceName ¶
HeadlessHeadServiceName returns the name of the headless service used to register the head ray pod.
func HeadlessWorkerServiceName ¶
HeadlessWorkerServiceName returns the name of the headless service used to register ray worker pods.
func HorizontalPodAutoscalerObjectMeta ¶
func HorizontalPodAutoscalerObjectMeta(rc *dcv1alpha1.RayCluster) metav1.ObjectMeta
HorizontalPodAutoscalerObjectMeta returns the ObjectMeta object used to identify new HPA objects.
func InstanceObjectName ¶
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 NewClientService ¶
func NewClientService(rc *dcv1alpha1.RayCluster) *corev1.Service
NewClientService creates a ClusterIP service that points to the head node that exposes the client server port, and dashboard port when enabled.
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 NewHeadlessHeadService ¶
func NewHeadlessHeadService(rc *dcv1alpha1.RayCluster) *corev1.Service
NewHeadlessHeadService creates a headless service that points to the head node and exposes cluster communication ports.
func NewHeadlessWorkerService ¶
func NewHeadlessWorkerService(rc *dcv1alpha1.RayCluster) *corev1.Service
NewHeadlessWorkerService creates a headless service that points to the worker nodes and exposes cluster communication ports.
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, istioEnabled bool) (*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" )