Skip to content

Commit 21a3611

Browse files
authored
Remove unused fields from KubeRay operator and RayCluster charts (ray-project#839)
Some fields in KubeRay operator chart and RayCluster chart are useless. This PR removes those fields. Signed-off-by: Kai-Hsun Chen <kaihsun@apache.org>
1 parent d4784a5 commit 21a3611

File tree

5 files changed

+32
-21
lines changed

5 files changed

+32
-21
lines changed

docs/deploy/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ helm install kuberay-operator kuberay/kuberay-operator
2626
#### Method 2: Kustomize
2727
```sh
2828
# Install CRDs
29-
kubectl create -k "github.com/ray-project/kuberay/manifests/cluster-scope-resources?ref=v0.4.0"
29+
kubectl create -k "github.com/ray-project/kuberay/manifests/cluster-scope-resources?ref=v0.4.0&timeout=90s"
3030

3131
# Install KubeRay operator
3232
kubectl apply -k "github.com/ray-project/kuberay/manifests/base?ref=v0.4.0"

helm-chart/kuberay-operator/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ helm version
3535
helm install kuberay-operator .
3636
```
3737

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+
3849
## List the chart
3950

4051
To list the `my-release` deployment:

helm-chart/kuberay-operator/values.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ image:
1010
nameOverride: "kuberay-operator"
1111
fullnameOverride: "kuberay-operator"
1212

13-
## Install Default RBAC roles and bindings
14-
rbac:
15-
create: true
16-
apiVersion: v1
17-
1813
serviceAccount:
1914
# Specifies whether a service account should be created
2015
create: true
@@ -50,7 +45,6 @@ readinessProbe:
5045
periodSeconds: 5
5146
failureThreshold: 5
5247

53-
createCustomResource: true
5448
rbacEnable: true
5549

5650
batchScheduler:

helm-chart/ray-cluster/templates/raycluster-cluster.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ spec:
6161
nodeSelector: {{- toYaml .Values.head.nodeSelector | nindent 10 }}
6262
metadata:
6363
annotations: {{- toYaml .Values.head.annotations | nindent 10 }}
64-
labels:
64+
{{- if .Values.head.labels }}
65+
labels: {{- toYaml .Values.head.labels | nindent 10 }}
6566
{{ include "ray-cluster.labels" . | indent 10 }}
67+
{{ else }}
68+
labels: {{ include "ray-cluster.labels" . | nindent 10 }}
69+
{{- end }}
6670

6771
workerGroupSpecs:
6872
{{- range $groupName, $values := .Values.additionalWorkerGroups }}
@@ -117,8 +121,13 @@ spec:
117121
nodeSelector: {{- toYaml $values.nodeSelector | nindent 10 }}
118122
metadata:
119123
annotations: {{- toYaml $values.annotations | nindent 10 }}
120-
labels:
124+
{{- if $values.labels }}
125+
labels: {{- toYaml $values.labels | nindent 10 }}
121126
{{ include "ray-cluster.labels" $ | indent 10 }}
127+
{{ else }}
128+
labels: {{ include "ray-cluster.labels" $ | nindent 10 }}
129+
{{- end }}
130+
122131
{{- end }}
123132
{{- end }}
124133
{{- if ne (.Values.worker.disabled | default false) true }}
@@ -172,6 +181,10 @@ spec:
172181
nodeSelector: {{- toYaml .Values.worker.nodeSelector | nindent 10 }}
173182
metadata:
174183
annotations: {{- toYaml .Values.worker.annotations | nindent 10 }}
175-
labels:
184+
{{- if .Values.worker.labels }}
185+
labels: {{- toYaml .Values.worker.labels | nindent 10 }}
176186
{{ include "ray-cluster.labels" . | indent 10 }}
187+
{{ else }}
188+
labels: {{ include "ray-cluster.labels" $ | nindent 10 }}
189+
{{- end }}
177190
{{- end }}

helm-chart/ray-cluster/values.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ imagePullSecrets: []
1717
# - name: an-existing-secret
1818

1919
head:
20-
groupName: headgroup
2120
# If enableInTreeAutoscaling is true, the autoscaler sidecar will be added to the Ray head pod.
2221
# Ray autoscaler integration is supported only for Ray versions >= 1.11.0
2322
# Ray autoscaler integration is Beta with KubeRay >= 0.3.0 and Ray >= 2.0.0.
@@ -39,8 +38,7 @@ head:
3938
# requests:
4039
# cpu: "500m"
4140
# memory: "512Mi"
42-
# labels:
43-
# key: value
41+
labels: {}
4442
rayStartParams:
4543
dashboard-host: '0.0.0.0'
4644
block: 'true'
@@ -95,9 +93,7 @@ worker:
9593
# disabled: true
9694
groupName: workergroup
9795
replicas: 1
98-
type: worker
99-
# labels:
100-
# key: value
96+
labels: {}
10197
rayStartParams:
10298
block: 'true'
10399
initContainerImage: 'busybox:1.28' # Enable users to specify the image for init container. Users can pull the busybox image from their private repositories.
@@ -129,8 +125,7 @@ worker:
129125
requests:
130126
cpu: "1"
131127
memory: "1G"
132-
annotations:
133-
key: value
128+
annotations: {}
134129
nodeSelector: {}
135130
tolerations: []
136131
affinity: {}
@@ -157,7 +152,6 @@ additionalWorkerGroups:
157152
replicas: 1
158153
minReplicas: 1
159154
maxReplicas: 3
160-
type: worker
161155
labels: {}
162156
rayStartParams:
163157
block: 'true'
@@ -190,8 +184,7 @@ additionalWorkerGroups:
190184
requests:
191185
cpu: 1
192186
memory: "1G"
193-
annotations:
194-
key: value
187+
annotations: {}
195188
nodeSelector: {}
196189
tolerations: []
197190
affinity: {}

0 commit comments

Comments
 (0)