Skip to content

Commit 35507cc

Browse files
authored
release 0.5.0-rc.0 (#13)
1 parent ce98153 commit 35507cc

26 files changed

+404
-133
lines changed

helm-chart/kuberay-apiserver/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.4.0
18+
version: 0.5.0-rc.0
+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# KubeRay API Server
2+
3+
This document provides instructions to install the KubeRay API Server with a Helm chart.
4+
5+
## Helm
6+
7+
Make sure the version of Helm is v3+. Currently, [existing CI tests](https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm-lint.yaml) are based on Helm v3.4.1 and v3.9.4.
8+
9+
```sh
10+
helm version
11+
```
12+
13+
## Install KubeRay API Server
14+
15+
* Install a stable version via Helm repository (only supports KubeRay v0.4.0+)
16+
```sh
17+
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
18+
19+
# Install the KubeRay API Server at Version v0.4.0.
20+
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 0.4.0
21+
22+
# Check that the KubeRay API Server is running in the "default" namespaces.
23+
kubectl get pods
24+
# NAME READY STATUS RESTARTS AGE
25+
# kuberay-apiserver-xxxxxx 1/1 Running 0 17s
26+
```
27+
28+
* Install the nightly version
29+
```sh
30+
# Step1: Clone KubeRay repository
31+
32+
# Step2: Move to `helm-chart/kuberay-apiserver`
33+
34+
# Step3: Install the KubeRay apiserver
35+
helm install kuberay-apiserver .
36+
```
37+
38+
## List the chart
39+
40+
To list the `kuberay-apiserver` release:
41+
42+
```sh
43+
helm ls
44+
# NAME NAMESPACE REVISION UPDATED STATUS CHART
45+
# kuberay-apiserver default 1 2022-12-02 02:13:37.514445313 +0000 UTC deployed kuberay-apiserver-0.4.0
46+
```
47+
48+
## Uninstall the Chart
49+
50+
```sh
51+
# Uninstall the `kuberay-apiserver` release
52+
helm uninstall kuberay-apiserver
53+
54+
# The API Server Pod should be removed.
55+
kubectl get pods
56+
# No resources found in default namespace.
57+
```

helm-chart/kuberay-apiserver/templates/deployment.yaml

+15-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,18 @@ spec:
2525
{{- toYaml .Values.containerPort | nindent 8 }}
2626
resources:
2727
{{- toYaml .Values.resources | nindent 10 }}
28-
28+
{{- if .Values.sidecarContainers }}
29+
{{- toYaml .Values.sidecarContainers | nindent 6 }}
30+
{{- end }}
31+
{{- with .Values.nodeSelector }}
32+
nodeSelector:
33+
{{- toYaml . | nindent 8 }}
34+
{{- end }}
35+
{{- with .Values.affinity }}
36+
affinity:
37+
{{- toYaml . | nindent 8 }}
38+
{{- end }}
39+
{{- with .Values.tolerations }}
40+
tolerations:
41+
{{- toYaml . | nindent 8 }}
42+
{{- end }}

helm-chart/kuberay-apiserver/templates/role.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11

22
{{- if .Values.rbacEnable }}
33
apiVersion: rbac.authorization.k8s.io/v1
4+
{{- if .Values.singleNamespaceInstall }}
5+
kind: Role
6+
{{- else }}
47
kind: ClusterRole
8+
{{- end }}
59
metadata:
610
labels:
711
app.kubernetes.io/name: {{ .Values.name }}
@@ -12,6 +16,7 @@ rules:
1216
resources:
1317
- rayclusters
1418
- rayjobs
19+
- rayservices
1520
verbs:
1621
- create
1722
- delete

helm-chart/kuberay-apiserver/templates/rolebinding.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{{- if .Values.rbacEnable }}
2+
{{- if .Values.singleNamespaceInstall }}
3+
kind: RoleBinding
4+
{{- else }}
25
kind: ClusterRoleBinding
6+
{{- end }}
37
apiVersion: rbac.authorization.k8s.io/v1
48
metadata:
59
labels:
@@ -10,7 +14,11 @@ subjects:
1014
name: {{ .Values.serviceAccount.name }}
1115
namespace: {{ .Release.Namespace }}
1216
roleRef:
17+
{{- if .Values.singleNamespaceInstall }}
18+
kind: Role
19+
{{- else }}
1320
kind: ClusterRole
21+
{{- end }}
1422
name: {{ include "kuberay-apiserver.fullname" . }}
1523
apiGroup: rbac.authorization.k8s.io
1624
{{- end }}

helm-chart/kuberay-apiserver/templates/service.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ metadata:
99
spec:
1010
type: {{ .Values.service.type }}
1111
selector:
12-
app.kubernetes.io/name: {{ .Values.name }}
12+
app.kubernetes.io/component: {{ include "kuberay-apiserver.name" . }}
13+
app.kubernetes.io/name: {{ .Release.Name }}
1314
ports:
1415
{{- toYaml .Values.service.ports | nindent 12 }}

helm-chart/kuberay-apiserver/values.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ replicaCount: 1
77
name: "kuberay-apiserver"
88
image:
99
repository: kuberay/apiserver
10-
tag: v0.4.0
10+
tag: v0.5.0-rc.0
1111
pullPolicy: IfNotPresent
1212

1313
## Install Default RBAC roles and bindings
@@ -50,3 +50,6 @@ ingress:
5050
enabled: false
5151

5252
rbacEnable: true
53+
54+
# the chart can be installed by users with permissions to a single namespace only
55+
singleNamespaceInstall: false
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
description: A Helm chart for Kubernetes
33
name: kuberay-operator
4-
version: 0.4.0
4+
version: 0.5.0-rc.0
55
icon: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png
66
type: application

helm-chart/kuberay-operator/README.md

+52-32
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,72 @@
11
# KubeRay Operator
22

3-
Kuberay-operator: A simple Helm chart
4-
5-
Run a deployment of Ray Operator.
6-
7-
Deploy ray operator first, then deploy ray cluster.
3+
This document provides instructions to install both CRDs (RayCluster, RayJob, RayService) and KubeRay operator with a Helm chart.
84

95
## Helm
106

11-
Make sure helm version is v3+
12-
```console
13-
$ helm version
14-
version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa28009b71", GitTreeState:"dirty", GoVersion:"go1.16.5"}
7+
Make sure the version of Helm is v3+. Currently, [existing CI tests](https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm-lint.yaml) are based on Helm v3.4.1 and v3.9.4.
8+
9+
```sh
10+
helm version
1511
```
1612

17-
## Installing the Chart
13+
## Install CRDs and KubeRay operator
1814

19-
To avoid duplicate CRD definitions in this repo, we reuse CRD config in `ray-operator`:
20-
```console
21-
$ kubectl create -k "github.com/ray-project/kuberay/ray-operator/config/crd?ref=v0.3.0&timeout=90s"
22-
```
23-
> Note that we must use `kubectl create` to install the CRDs.
24-
> The corresponding `kubectl apply` command will not work. See [KubeRay issue #271](https://github.com/ray-project/kuberay/issues/271).
15+
* Install a stable version via Helm repository (only supports KubeRay v0.4.0+)
16+
```sh
17+
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
2518

26-
Use the following command to install the chart:
27-
```console
28-
$ helm install kuberay-operator --namespace ray-system --create-namespace $(curl -s https://api.github.com/repos/ray-project/kuberay/releases/tags/v0.3.0 | grep '"browser_download_url":' | sort | grep -om1 'https.*helm-chart-kuberay-operator.*tgz')
29-
```
19+
# Install both CRDs and KubeRay operator v0.4.0.
20+
helm install kuberay-operator kuberay/kuberay-operator --version 0.4.0
21+
22+
# Check the KubeRay operator Pod in `default` namespace
23+
kubectl get pods
24+
# NAME READY STATUS RESTARTS AGE
25+
# kuberay-operator-6fcbb94f64-mbfnr 1/1 Running 0 17s
26+
```
3027

31-
## List the Chart
28+
* Install the nightly version
29+
```sh
30+
# Step1: Clone KubeRay repository
31+
32+
# Step2: Move to `helm-chart/kuberay-operator`
33+
34+
# Step3: Install KubeRay operator
35+
helm install kuberay-operator .
36+
```
37+
38+
* Install KubeRay operator without installing CRDs
39+
* In some cases, the installation of the CRDs and the installation of the operator may require different levels of admin permissions, so these two installations could be handled as different steps by different roles.
40+
* Use Helm's built-in `--skip-crds` flag to install the operator only. See [this document](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) for more details.
41+
```sh
42+
# Step 1: Install CRDs only (for cluster admin)
43+
kubectl create -k "github.com/ray-project/kuberay/manifests/cluster-scope-resources?ref=v0.4.0&timeout=90s"
44+
45+
# Step 2: Install KubeRay operator only. (for developer)
46+
helm install kuberay-operator kuberay/kuberay-operator --version 0.4.0 --skip-crds
47+
```
48+
49+
## List the chart
3250

3351
To list the `my-release` deployment:
3452

35-
```console
36-
$ helm list -n ray-system
53+
```sh
54+
helm ls
55+
# NAME NAMESPACE REVISION UPDATED STATUS CHART # APP VERSION
56+
# kuberay-operator default 1 2022-12-02 02:13:37.514445313 +0000 UTC deployed kuberay-operator-0.4.0 1.0
3757
```
3858

39-
## Uninstalling the Chart
59+
## Uninstall the Chart
4060

41-
To uninstall/delete the `my-release` deployment:
61+
```sh
62+
# Uninstall the `kuberay-operator` release
63+
helm uninstall kuberay-operator
4264

43-
```console
44-
$ helm delete kuberay-operator -n ray-system
65+
# The operator Pod should be removed.
66+
kubectl get pods
67+
# No resources found in default namespace.
4568
```
4669

47-
The command removes nearly all the Kubernetes components associated with the
48-
chart and deletes the release.
49-
5070
## Working with Argo CD
5171

5272
If you are using [Argo CD](https://argoproj.github.io) to manage the operator, you will encounter the issue which complains the CRDs too long. Same with [this issue](https://github.com/prometheus-operator/prometheus-operator/issues/4439).
@@ -63,7 +83,7 @@ spec:
6383
project: default
6484
source:
6585
repoURL: https://github.com/ray-project/kuberay
66-
targetRevision: v0.3.0
86+
targetRevision: v0.4.0
6787
path: helm-chart/kuberay-operator/crds
6888
destination:
6989
server: https://kubernetes.default.svc
@@ -83,7 +103,7 @@ metadata:
83103
spec:
84104
source:
85105
repoURL: https://github.com/ray-project/kuberay
86-
targetRevision: v0.3.0
106+
targetRevision: v0.4.0
87107
path: helm-chart/kuberay-operator
88108
helm:
89109
skipCrds: true

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

+33-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,28 @@ spec:
1616
singular: raycluster
1717
scope: Namespaced
1818
versions:
19-
- name: v1alpha1
19+
- additionalPrinterColumns:
20+
- jsonPath: .status.desiredWorkerReplicas
21+
name: desired workers
22+
type: integer
23+
- jsonPath: .status.availableWorkerReplicas
24+
name: available workers
25+
type: integer
26+
- jsonPath: .status.state
27+
name: status
28+
type: string
29+
- jsonPath: .metadata.creationTimestamp
30+
name: age
31+
type: date
32+
- jsonPath: .status.head.podIP
33+
name: head pod IP
34+
priority: 1
35+
type: string
36+
- jsonPath: .status.head.serviceIP
37+
name: head service IP
38+
priority: 1
39+
type: string
40+
name: v1alpha1
2041
schema:
2142
openAPIV3Schema:
2243
description: RayCluster is the Schema for the RayClusters API
@@ -5706,12 +5727,15 @@ spec:
57065727
type: object
57075728
required:
57085729
- rayStartParams
5709-
- serviceType
57105730
- template
57115731
type: object
5732+
headServiceAnnotations:
5733+
additionalProperties:
5734+
type: string
5735+
type: object
57125736
rayVersion:
5713-
description: RayVersion is the version of ray being used. this affects
5714-
the command used to start ray
5737+
description: RayVersion is the version of ray being used. This determines
5738+
the autoscaler's image version.
57155739
type: string
57165740
workerGroupSpecs:
57175741
description: WorkerGroupSpecs are the specs for the worker pods
@@ -11253,6 +11277,11 @@ spec:
1125311277
each node group.
1125411278
format: int32
1125511279
type: integer
11280+
observedGeneration:
11281+
description: observedGeneration is the most recent generation observed
11282+
for this RayCluster.
11283+
format: int64
11284+
type: integer
1125611285
reason:
1125711286
description: Reason provides more information about current State
1125811287
type: string

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

+16-3
Original file line numberDiff line numberDiff line change
@@ -5970,12 +5970,15 @@ spec:
59705970
type: object
59715971
required:
59725972
- rayStartParams
5973-
- serviceType
59745973
- template
59755974
type: object
5975+
headServiceAnnotations:
5976+
additionalProperties:
5977+
type: string
5978+
type: object
59765979
rayVersion:
5977-
description: RayVersion is the version of ray being used. this
5978-
affects the command used to start ray
5980+
description: RayVersion is the version of ray being used. This
5981+
determines the autoscaler's image version.
59795982
type: string
59805983
workerGroupSpecs:
59815984
description: WorkerGroupSpecs are the specs for the worker pods
@@ -11769,6 +11772,11 @@ spec:
1176911772
type: string
1177011773
message:
1177111774
type: string
11775+
observedGeneration:
11776+
description: observedGeneration is the most recent generation observed
11777+
for this RayJob.
11778+
format: int64
11779+
type: integer
1177211780
rayClusterName:
1177311781
type: string
1177411782
rayClusterStatus:
@@ -11813,6 +11821,11 @@ spec:
1181311821
of each node group.
1181411822
format: int32
1181511823
type: integer
11824+
observedGeneration:
11825+
description: observedGeneration is the most recent generation
11826+
observed for this RayCluster.
11827+
format: int64
11828+
type: integer
1181611829
reason:
1181711830
description: Reason provides more information about current State
1181811831
type: string

0 commit comments

Comments
 (0)