Skip to content

Commit fc8ad95

Browse files
committed
chore(helm): refactor Ray configuration and update Makefile
- Replaced `ray.image.tag` with `ray-cluster.image.tag` in Makefile for consistency. - Introduced a new `ray-cluster` configuration in `values.yaml` to streamline Ray deployment settings. - Removed deprecated `ray` template definitions and updated helper functions to reflect the new structure. - Added a ConfigMap for KubeRay operator to manage container configurations. - Enhanced resource specifications and lifecycle management for Ray components.
1 parent f78f2db commit fc8ad95

File tree

7 files changed

+201
-319
lines changed

7 files changed

+201
-319
lines changed

Makefile

+6-12
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ helm-integration-test-latest: # Run integration test on th
247247
--set modelBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
248248
--set modelBackend.image.tag=latest \
249249
--set console.image.tag=latest \
250-
--set ray.image.tag=${RAY_LATEST_TAG} \
251-
--set tags.observability=true
250+
--set ray-cluster.image.tag=${RAY_LATEST_TAG}
252251
@kubectl rollout status deployment ${HELM_RELEASE_NAME}-api-gateway --namespace ${HELM_NAMESPACE} --timeout=600s
253252
@export API_GATEWAY_POD_NAME=$$(kubectl get pods --namespace ${HELM_NAMESPACE} -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}") && \
254253
kubectl --namespace ${HELM_NAMESPACE} port-forward $${API_GATEWAY_POD_NAME} ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
@@ -292,8 +291,7 @@ helm-integration-test-release: # Run integration test on t
292291
--set modelBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
293292
--set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \
294293
--set console.image.tag=${CONSOLE_VERSION} \
295-
--set ray.image.tag=${RAY_RELEASE_TAG} \
296-
--set tags.observability=true
294+
--set ray-cluster.image.tag=${RAY_RELEASE_TAG}
297295
@kubectl rollout status deployment ${HELM_RELEASE_NAME}-api-gateway --namespace ${HELM_NAMESPACE} --timeout=600s
298296
@export API_GATEWAY_POD_NAME=$$(kubectl get pods --namespace ${HELM_NAMESPACE} -l "app.kubernetes.io/component=api-gateway,app.kubernetes.io/instance=core" -o jsonpath="{.items[0].metadata.name}") && \
299297
kubectl --namespace ${HELM_NAMESPACE} port-forward $${API_GATEWAY_POD_NAME} ${API_GATEWAY_PORT}:${API_GATEWAY_PORT} > /dev/null 2>&1 &
@@ -360,7 +358,6 @@ console-helm-integration-test-latest: # Run console integr
360358
ifeq ($(UNAME_S),Darwin)
361359
@helm install ${HELM_RELEASE_NAME} charts/core --namespace ${HELM_NAMESPACE} --create-namespace \
362360
--set edition=k8s-ce:test \
363-
--set tags.observability=false \
364361
--set apiGateway.image.tag=latest \
365362
--set mgmtBackend.image.tag=latest \
366363
--set mgmtBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
@@ -370,14 +367,13 @@ ifeq ($(UNAME_S),Darwin)
370367
--set modelBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
371368
--set modelBackend.image.tag=latest \
372369
--set console.image.tag=latest \
373-
--set ray.image.tag=${RAY_LATEST_TAG} \
370+
--set ray-cluster.image.tag=${RAY_LATEST_TAG} \
374371
--set apiGatewayURL=http://host.docker.internal:${API_GATEWAY_PORT} \
375372
--set console.serverApiGatewayURL=http://host.docker.internal:${API_GATEWAY_PORT} \
376373
--set consoleURL=http://host.docker.internal:${CONSOLE_PORT}
377374
else ifeq ($(UNAME_S),Linux)
378375
@helm install ${HELM_RELEASE_NAME} charts/core --namespace ${HELM_NAMESPACE} --create-namespace \
379376
--set edition=k8s-ce:test \
380-
--set tags.observability=false \
381377
--set apiGateway.image.tag=latest \
382378
--set mgmtBackend.image.tag=latest \
383379
--set mgmtBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
@@ -387,7 +383,7 @@ else ifeq ($(UNAME_S),Linux)
387383
--set modelBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
388384
--set modelBackend.image.tag=latest \
389385
--set console.image.tag=latest \
390-
--set ray.image.tag=${RAY_LATEST_TAG} \
386+
--set ray-cluster.image.tag=${RAY_LATEST_TAG} \
391387
--set apiGatewayURL=http://localhost:${API_GATEWAY_PORT} \
392388
--set console.serverApiGatewayURL=http://localhost:${API_GATEWAY_PORT} \
393389
--set consoleURL=http://localhost:${CONSOLE_PORT}
@@ -438,7 +434,6 @@ console-helm-integration-test-release: # Run console integ
438434
ifeq ($(UNAME_S),Darwin)
439435
@helm install ${HELM_RELEASE_NAME} charts/core --namespace ${HELM_NAMESPACE} --create-namespace \
440436
--set edition=k8s-ce:test \
441-
--set tags.observability=false \
442437
--set apiGateway.image.tag=${API_GATEWAY_VERSION} \
443438
--set mgmtBackend.image.tag=${MGMT_BACKEND_VERSION} \
444439
--set mgmtBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
@@ -448,14 +443,13 @@ ifeq ($(UNAME_S),Darwin)
448443
--set modelBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
449444
--set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \
450445
--set console.image.tag=${CONSOLE_VERSION} \
451-
--set ray.image.tag=${RAY_RELEASE_TAG} \
446+
--set ray-cluster.image.tag=${RAY_RELEASE_TAG} \
452447
--set apiGatewayURL=http://host.docker.internal:${API_GATEWAY_PORT} \
453448
--set console.serverApiGatewayURL=http://host.docker.internal:${API_GATEWAY_PORT} \
454449
--set consoleURL=http://host.docker.internal:${CONSOLE_PORT}
455450
else ifeq ($(UNAME_S),Linux)
456451
@helm install ${HELM_RELEASE_NAME} charts/core --namespace ${HELM_NAMESPACE} --create-namespace \
457452
--set edition=k8s-ce:test \
458-
--set tags.observability=false \
459453
--set apiGateway.image.tag=${API_GATEWAY_VERSION} \
460454
--set mgmtBackend.image.tag=${MGMT_BACKEND_VERSION} \
461455
--set mgmtBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
@@ -465,7 +459,7 @@ else ifeq ($(UNAME_S),Linux)
465459
--set modelBackend.instillCoreHost=http://${INSTILL_CORE_HOST}:${API_GATEWAY_PORT} \
466460
--set modelBackend.image.tag=${MODEL_BACKEND_VERSION} \
467461
--set console.image.tag=${CONSOLE_VERSION} \
468-
--set ray.image.tag=${RAY_RELEASE_TAG} \
462+
--set ray-cluster.image.tag=${RAY_RELEASE_TAG} \
469463
--set apiGatewayURL=http://localhost:${API_GATEWAY_PORT} \
470464
--set console.serverApiGatewayURL=http://localhost:${API_GATEWAY_PORT} \
471465
--set consoleURL=http://localhost:${CONSOLE_PORT}

charts/core/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ The Helm chart of Instill Core
88

99
| Repository | Name | Version |
1010
|------------|------|---------|
11-
| https://helm.elastic.co | elasticsearch | 7.17.3 |
11+
| https://helm.elastic.co | elasticsearch | 8.5.1 |
1212
| https://helm.influxdata.com | influxdb2 | 2.1.1 |
1313
| https://jaegertracing.github.io/helm-charts | jaeger | 3.4.1 |
1414
| https://open-telemetry.github.io/opentelemetry-helm-charts | opentelemetry-collector | 0.119.0 |
1515
| https://prometheus-community.github.io/helm-charts | kube-prometheus-stack | 70.3.0 |
16-
| https://ray-project.github.io/kuberay-helm/ | kuberay-operator | 1.3.2 |
17-
| https://zilliztech.github.io/milvus-helm/ | milvus | 4.1.30 |
16+
| https://ray-project.github.io/kuberay-helm | kuberay-operator | 1.3.2 |
17+
| https://ray-project.github.io/kuberay-helm | ray-cluster | 0.4.0 |
18+
| https://zilliztech.github.io/milvus-helm | milvus | 4.1.30 |
1819

1920
## Install
2021

charts/core/templates/_helpers.tpl

+46-41
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,6 @@ Allow the release namespace to be overridden for multi-namespace deployments in
3434
{{- end -}}
3535
{{- end -}}
3636

37-
{{/*
38-
Ray fullname
39-
*/}}
40-
{{- define "ray.fullname" -}}
41-
{{- if .Values.ray.namespaceOverride -}}
42-
{{- .Values.ray.namespaceOverride -}}
43-
{{- else -}}
44-
{{- printf "%s" (include "core.name" .) -}}
45-
{{- end -}}
46-
{{- end -}}
47-
48-
{{/*
49-
Inter namespace DNS suffix
50-
*/}}
51-
{{- define "ray.suffix" -}}
52-
{{- if .Values.ray.namespaceOverride -}}
53-
{{- printf ".%s.svc.cluster.local" (include "ray.fullname" .) -}}
54-
{{- else -}}
55-
{{- printf "" -}}
56-
{{- end -}}
57-
{{- end -}}
58-
5937
{{/*
6038
Create chart name and version as used by the chart label.
6139
*/}}
@@ -257,40 +235,67 @@ Temporal
257235
{{- printf "8096" -}}
258236
{{- end -}}
259237

260-
{{- define "core.kuberay-operator" -}}
261-
{{- printf "%s-kuberay-operator" (include "ray.fullname" .) -}}
262-
{{- end -}}
263-
238+
{{/*
239+
KubeRay
240+
*/}}
264241
{{- define "core.ray" -}}
265-
{{- printf "%s-ray" (include "ray.fullname" .) -}}
242+
{{- printf "%s-kuberay" (include "core.fullname" .) -}}
266243
{{- end -}}
267244

268-
{{- define "core.rayServiceName" -}}
269-
{{- printf "%s-ray-head-svc%s" (include "ray.fullname" .) (include "ray.suffix" .) -}}
245+
{{- define "core.kuberay.host" -}}
246+
{{- if (index .Values "ray-cluster").enabled -}}
247+
{{- printf "%s-head-svc" (include "core.ray" .) -}}
248+
{{- else -}}
249+
{{- printf "%s" (index .Values "ray-cluster").external.host -}}
250+
{{- end -}}
270251
{{- end -}}
271252

272-
{{- define "core.ray.clientPort" -}}
273-
{{- printf "10001" -}}
253+
{{- define "core.kuberay.clientPort" -}}
254+
{{- if (index .Values "ray-cluster").enabled -}}
255+
{{- printf "10001" -}}
256+
{{- else -}}
257+
{{- printf "%s" (index .Values "ray-cluster").external.clientPort -}}
258+
{{- end -}}
274259
{{- end -}}
275260

276-
{{- define "core.ray.gcsPort" -}}
277-
{{- printf "6379" -}}
261+
{{- define "core.kuberay.gcsPort" -}}
262+
{{- if (index .Values "ray-cluster").enabled -}}
263+
{{- printf "6379" -}}
264+
{{- else -}}
265+
{{- printf "%s" (index .Values "ray-cluster").external.gcsPort -}}
266+
{{- end -}}
278267
{{- end -}}
279268

280-
{{- define "core.ray.dashboardPort" -}}
281-
{{- printf "8265" -}}
269+
{{- define "core.kuberay.dashboardPort" -}}
270+
{{- if (index .Values "ray-cluster").enabled -}}
271+
{{- printf "8265" -}}
272+
{{- else -}}
273+
{{- printf "%s" (index .Values "ray-cluster").external.dashboardPort -}}
274+
{{- end -}}
282275
{{- end -}}
283276

284-
{{- define "core.ray.servePort" -}}
285-
{{- printf "8000" -}}
277+
{{- define "core.kuberay.servePort" -}}
278+
{{- if (index .Values "ray-cluster").enabled -}}
279+
{{- printf "8000" -}}
280+
{{- else -}}
281+
{{- printf "%s" (index .Values "ray-cluster").external.servePort -}}
282+
{{- end -}}
286283
{{- end -}}
287284

288-
{{- define "core.ray.serveGrpcPort" -}}
289-
{{- printf "9000" -}}
285+
{{- define "core.kuberay.serveGrpcPort" -}}
286+
{{- if (index .Values "ray-cluster").enabled -}}
287+
{{- printf "9000" -}}
288+
{{- else -}}
289+
{{- printf "%s" (index .Values "ray-cluster").external.serveGrpcPort -}}
290+
{{- end -}}
290291
{{- end -}}
291292

292-
{{- define "core.ray.metricsPort" -}}
293-
{{- printf "8080" -}}
293+
{{- define "core.kuberay.metricsPort" -}}
294+
{{- if (index .Values "ray-cluster").enabled -}}
295+
{{- printf "8080" -}}
296+
{{- else -}}
297+
{{- printf "%s" (index .Values "ray-cluster").external.metricsPort -}}
298+
{{- end -}}
294299
{{- end -}}
295300

296301
{{/*

charts/core/templates/ray/configmap.yaml renamed to charts/core/templates/kuberay/configmap.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
{{- if (index .Values "ray-cluster").enabled }}
12
apiVersion: v1
23
kind: ConfigMap
34
metadata:
4-
name: {{ template "core.ray" . }}-podman
5+
name: {{ include "core.ray" . }}-podman
6+
namespace: {{ .Release.Namespace }}
57
data:
68
registries.conf: |
7-
unqualified-search-registries = ["{{ template "core.registry" . }}:{{ template "core.registry.port" . }}", "docker.io", "quay.io"]
9+
unqualified-search-registries = ["{{ include "core.registry" . }}:{{ include "core.registry.port" . }}", "docker.io", "quay.io"]
810
911
[[registry]]
10-
location = "{{ template "core.registry" . }}:{{ template "core.registry.port" . }}"
12+
location = "{{ include "core.registry" . }}:{{ include "core.registry.port" . }}"
1113
insecure = true
1214
policy.json: |
1315
{
@@ -25,3 +27,4 @@ data:
2527
storage.conf: |
2628
[storage]
2729
driver = "overlay"
30+
{{- end }}

charts/core/templates/model-backend/configmap.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ data:
5050
key: /etc/instill-ai/core/ssl/artifact/tls.key
5151
{{- end }}
5252
ray:
53-
host: {{ include "core.ray.host" . }}
53+
host: {{ include "core.kuberay.host" . }}
5454
port:
55-
grpc: {{ include "core.ray.serveGrpcPort" . }}
56-
client: {{ include "core.ray.servePort" . }}
57-
dashboard: {{ include "core.ray.dashboardPort" . }}
58-
gcs: {{ include "core.ray.gcsPort" . }}
59-
serve: {{ include "core.ray.servePort" . }}
60-
metrics: {{ include "core.ray.metricsPort" . }}
55+
grpc: {{ include "core.kuberay.serveGrpcPort" . }}
56+
client: {{ include "core.kuberay.servePort" . }}
57+
dashboard: {{ include "core.kuberay.dashboardPort" . }}
58+
gcs: {{ include "core.kuberay.gcsPort" . }}
59+
serve: {{ include "core.kuberay.servePort" . }}
60+
metrics: {{ include "core.kuberay.metricsPort" . }}
6161
modelstore: /model-store
6262
vram: {{ (index .Values "ray-cluster").vram }}
6363
database:

0 commit comments

Comments
 (0)