Skip to content

Commit 0b3ce04

Browse files
committed
Add support for Ray token auth
Signed-off-by: Andrew Sy Kim <[email protected]>
1 parent 3626d5c commit 0b3ce04

File tree

21 files changed

+459
-0
lines changed

21 files changed

+459
-0
lines changed

docs/reference/api.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,35 @@ Package v1 contains API Schema definitions for the ray v1 API group
1616

1717

1818

19+
#### AuthMode
20+
21+
_Underlying type:_ _string_
22+
23+
AuthMode describes the authentication mode for the Ray cluster.
24+
25+
26+
27+
_Appears in:_
28+
- [AuthOptions](#authoptions)
29+
30+
31+
32+
#### AuthOptions
33+
34+
35+
36+
AuthOptions defines the authentication options for a RayCluster.
37+
38+
39+
40+
_Appears in:_
41+
- [RayClusterSpec](#rayclusterspec)
42+
43+
| Field | Description | Default | Validation |
44+
| --- | --- | --- | --- |
45+
| `mode` _[AuthMode](#authmode)_ | Mode specifies the authentication mode.<br />Supported values are "disabled" and "token".<br />Defaults to "token". | | Enum: [disabled token] <br /> |
46+
47+
1948
#### AutoscalerOptions
2049

2150

@@ -268,6 +297,7 @@ _Appears in:_
268297

269298
| Field | Description | Default | Validation |
270299
| --- | --- | --- | --- |
300+
| `authOptions` _[AuthOptions](#authoptions)_ | AuthOptions specifies the authentication options for the RayCluster. | | |
271301
| `suspend` _boolean_ | Suspend indicates whether a RayCluster should be suspended.<br />A suspended RayCluster will have head pods and worker pods deleted. | | |
272302
| `managedBy` _string_ | ManagedBy is an optional configuration for the controller or entity that manages a RayCluster.<br />The value must be either 'ray.io/kuberay-operator' or 'kueue.x-k8s.io/multikueue'.<br />The kuberay-operator reconciles a RayCluster which doesn't have this field at all or<br />the field value is the reserved string 'ray.io/kuberay-operator',<br />but delegates reconciling the RayCluster with 'kueue.x-k8s.io/multikueue' to the Kueue.<br />The field is immutable. | | |
273303
| `autoscalerOptions` _[AutoscalerOptions](#autoscaleroptions)_ | AutoscalerOptions specifies optional configuration for the Ray autoscaler. | | |

helm-chart/kuberay-operator/crds/ray.io_rayclusters.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

helm-chart/kuberay-operator/crds/ray.io_rayjobs.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

helm-chart/kuberay-operator/crds/ray.io_rayservices.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

helm-chart/kuberay-operator/templates/_helpers.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ rules:
132132
resources:
133133
- events
134134
- pods/status
135+
- secrets
135136
- services
136137
verbs:
137138
- create

ray-operator/apis/ray/v1/raycluster_types.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import (
1111

1212
// RayClusterSpec defines the desired state of RayCluster
1313
type RayClusterSpec struct {
14+
// AuthOptions specifies the authentication options for the RayCluster.
15+
// +optional
16+
AuthOptions *AuthOptions `json:"authOptions,omitempty"`
1417
// Suspend indicates whether a RayCluster should be suspended.
1518
// A suspended RayCluster will have head pods and worker pods deleted.
1619
// +optional
@@ -46,6 +49,26 @@ type RayClusterSpec struct {
4649
WorkerGroupSpecs []WorkerGroupSpec `json:"workerGroupSpecs,omitempty"`
4750
}
4851

52+
// AuthMode describes the authentication mode for the Ray cluster.
53+
type AuthMode string
54+
55+
const (
56+
// AuthModeDisabled disables authentication.
57+
AuthModeDisabled AuthMode = "disabled"
58+
// AuthModeToken enables token-based authentication.
59+
AuthModeToken AuthMode = "token"
60+
)
61+
62+
// AuthOptions defines the authentication options for a RayCluster.
63+
type AuthOptions struct {
64+
// Mode specifies the authentication mode.
65+
// Supported values are "disabled" and "token".
66+
// Defaults to "token".
67+
// +kubebuilder:validation:Enum=disabled;token
68+
// +optional
69+
Mode AuthMode `json:"mode,omitempty"`
70+
}
71+
4972
// GcsFaultToleranceOptions contains configs for GCS FT
5073
type GcsFaultToleranceOptions struct {
5174
// +optional

ray-operator/apis/ray/v1/zz_generated.deepcopy.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ray-operator/config/crd/bases/ray.io_rayclusters.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ray-operator/config/crd/bases/ray.io_rayjobs.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ray-operator/config/crd/bases/ray.io_rayservices.yaml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)