Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions helm-chart/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ helm-lint: ## Run Helm chart lint test.
.PHONY: helm-docs
helm-docs: helm-docs-plugin ## Generates markdown documentation for Helm charts from requirements and values files.
$(HELM_DOCS) --chart-search-root=$(WORKDIR) --chart-to-generate=$(KUBERAY_OPERATOR_CHART_PATH) --sort-values-order=file
$(HELM_DOCS) --chart-search-root=$(WORKDIR) --chart-to-generate=$(RAY_CLUSTER_CHART_PATH) --sort-values-order=file
$(HELM_DOCS) --chart-search-root=$(WORKDIR) --chart-to-generate=$(KUBERAY_APISERVER_CHART_PATH) --sort-values-order=file

##@ Dependencies

Expand Down
2 changes: 1 addition & 1 deletion helm-chart/kuberay-apiserver/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.4.2
version: 1.7.0-rc.0
70 changes: 59 additions & 11 deletions helm-chart/kuberay-apiserver/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# KubeRay API Server
# KubeRay APIServer

This document provides instructions to install the KubeRay API Server with a Helm chart.
![Version: 1.7.0-rc.0](https://img.shields.io/badge/Version-1.7.0--rc.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

A Helm chart for kuberay-apiserver

## Introduction

This document provides instructions to install the KubeRay APIServer with a Helm chart.
KubeRay APIServer V2 is enabled by default, for more information,
please refer to the [KubeRay APIServer V2 documentation].

## Helm

Expand All @@ -11,7 +19,7 @@ v3.9.4.
helm version
```

## Install KubeRay API Server
## Install KubeRay APIServer

### Without security proxy

Expand All @@ -21,7 +29,7 @@ helm version
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm repo update
# Install KubeRay APIServer without security proxy
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2 --set security=null
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.7.0-rc.0 --set security=null
```

- Install the nightly version
Expand All @@ -32,7 +40,7 @@ helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2 --set s
# Step2: Navigate to `helm-chart/kuberay-apiserver`
cd helm-chart/kuberay-apiserver

# Step3: Install the KubeRay apiserver
# Step3: Install the KubeRay APIServer
helm install kuberay-apiserver . --set security=null
```

Expand All @@ -44,7 +52,7 @@ helm install kuberay-apiserver . --set security=null
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm repo update
# Install KubeRay APIServer
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.7.0-rc.0
```

- Install the nightly version
Expand All @@ -55,7 +63,7 @@ helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2
# Step2: Navigate to `helm-chart/kuberay-apiserver`
cd helm-chart/kuberay-apiserver

# Step3: Install the KubeRay apiserver
# Step3: Install the KubeRay APIServer
helm install kuberay-apiserver .
```

Expand All @@ -70,8 +78,8 @@ To list the `kuberay-apiserver` release:

```sh
helm ls
# NAME NAMESPACE REVISION UPDATED STATUS CHART
# kuberay-apiserver default 1 2022-12-02 02:13:37.514445313 +0000 UTC deployed kuberay-apiserver-1.1.0
# NAME NAMESPACE REVISION UPDATED STATUS CHART
# kuberay-apiserver default 1 2025-08-08 17:07:51.472353906 +0000 UTC deployed kuberay-apiserver-1.7.0-rc.0
```

## Uninstall the Chart
Expand All @@ -80,9 +88,49 @@ helm ls
# Uninstall the `kuberay-apiserver` release
helm uninstall kuberay-apiserver

# The API Server Pod should be removed.
# The APIServer Pod should be removed.
kubectl get pods
# No resources found in default namespace.
```

[existing CI tests]: https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm-lint.yaml
[existing CI tests]: https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm.yaml
[KubeRay APIServer V2 documentation]: https://github.com/ray-project/kuberay/blob/master/apiserversdk/README.md

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| replicaCount | int | `1` | |
| name | string | `"kuberay-apiserver"` | |
| image.repository | string | `"quay.io/kuberay/apiserver"` | Image repository. |
| image.tag | string | `"nightly"` | Image tag. |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. |
| cors | string | `nil` | |
| labels | object | `{}` | Extra labels. |
| annotations | object | `{}` | Extra annotations. |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
| serviceAccount.name | string | `"kuberay-apiserver"` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| containerPort[0].name | string | `"http"` | |
| containerPort[0].containerPort | int | `8888` | |
| containerPort[0].protocol | string | `"TCP"` | |
| containerPort[1].name | string | `"grpc"` | |
| containerPort[1].containerPort | int | `8887` | |
| containerPort[1].protocol | string | `"TCP"` | |
| resources | object | `{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"300m","memory":"300Mi"}}` | Resource requests and limits for containers. |
| sidecarContainers | list | `[]` | Sidecar containers to run along with the main container. |
| nodeSelector | object | `{}` | Node selector for pods. |
| affinity | object | `{}` | Affinity for pods. |
| tolerations | list | `[]` | Tolerations for pods. |
| service.type | string | `"ClusterIP"` | Service type. |
| service.ports | list | `[{"name":"http","port":8888,"protocol":"TCP","targetPort":8888},{"name":"rpc","port":8887,"protocol":"TCP","targetPort":8887}]` | Service port. |
| ingress.enabled | bool | `false` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.tls | list | `[]` | |
| route.enabled | bool | `false` | |
| route.annotations | object | `{}` | |
| rbacEnable | bool | `true` | Install Default RBAC roles and bindings |
| singleNamespaceInstall | bool | `false` | The chart can be installed by users with permissions to a single namespace only |
| enableAPIServerV2 | bool | `true` | If set to true, APIServer v2 would be served on the same port as the APIServer v1. |
| security.proxy | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/kuberay/security-proxy","tag":"nightly"}` | security proxy image. |
| security.env | object | `{"ENABLE_GRPC":"true","GRPC_LOCAL_PORT":8987,"HTTP_LOCAL_PORT":8988,"SECURITY_PREFIX":"/"}` | security proxy environment variables. |
104 changes: 104 additions & 0 deletions helm-chart/kuberay-apiserver/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# KubeRay APIServer

{{ template "chart.deprecationWarning" . }}

{{ template "chart.badgesSection" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

## Introduction

This document provides instructions to install the KubeRay APIServer with a Helm chart.
KubeRay APIServer V2 is enabled by default, for more information,
please refer to the [KubeRay APIServer V2 documentation].


## Helm

Make sure the version of Helm is v3+. Currently, [existing CI tests] are based on Helm v3.4.1 and
v3.9.4.

```sh
helm version
```

## Install KubeRay APIServer

### Without security proxy

- Install a stable version via Helm repository

```sh
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm repo update
# Install KubeRay APIServer without security proxy
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.7.0-rc.0 --set security=null
```

- Install the nightly version

```sh
# Step1: Clone KubeRay repository

# Step2: Navigate to `helm-chart/kuberay-apiserver`
cd helm-chart/kuberay-apiserver

# Step3: Install the KubeRay APIServer
helm install kuberay-apiserver . --set security=null
```

### With security proxy

- Install a stable version via Helm repository

```sh
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
helm repo update
# Install KubeRay APIServer
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.7.0-rc.0
```

- Install the nightly version

```sh
# Step1: Clone KubeRay repository

# Step2: Navigate to `helm-chart/kuberay-apiserver`
cd helm-chart/kuberay-apiserver

# Step3: Install the KubeRay APIServer
helm install kuberay-apiserver .
```

> [!IMPORTANT]
> If you receive an "Unauthorized" error when making a request, please add an
> authorization header to the request: `-H 'Authorization: 12345'` or install the
> APIServer without a security proxy.

## List the chart

To list the `kuberay-apiserver` release:

```sh
helm ls
# NAME NAMESPACE REVISION UPDATED STATUS CHART
# kuberay-apiserver default 1 2025-08-08 17:07:51.472353906 +0000 UTC deployed kuberay-apiserver-1.7.0-rc.0
```

## Uninstall the Chart

```sh
# Uninstall the `kuberay-apiserver` release
helm uninstall kuberay-apiserver

# The APIServer Pod should be removed.
kubectl get pods
# No resources found in default namespace.
```

[existing CI tests]: https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm.yaml
[KubeRay APIServer V2 documentation]: https://github.com/ray-project/kuberay/blob/master/apiserversdk/README.md

{{ template "chart.valuesSection" . }}
6 changes: 2 additions & 4 deletions helm-chart/kuberay-apiserver/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ image:
pullPolicy: Never

security:
proxy:
repository: kuberay/security-proxy
tag: local
pullPolicy: Never
env:
SECURITY_TOKEN: "12345"
27 changes: 5 additions & 22 deletions helm-chart/kuberay-apiserver/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "kuberay-apiserver.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
{{- $svcName := printf "%s-service" $fullName -}}
{{- $svcPort := (index .Values.service.ports 0).port -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
Expand All @@ -24,7 +14,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
Expand All @@ -44,19 +34,12 @@ spec:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
pathType: {{ .pathType | default "ImplementationSpecific" }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
name: {{ $svcName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rules:
verbs:
- list
- apiGroups:
- ""
- events.k8s.io
resources:
- events
verbs:
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/kuberay-apiserver/templates/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rules:
verbs:
- list
- apiGroups:
- ""
- events.k8s.io
resources:
- events
verbs:
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/kuberay-apiserver/templates/route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
subdomain: api-server-kuberay
to:
kind: Service
name: {{ .Values.name }}-service
name: {{ include "kuberay-apiserver.fullname" . }}-service
weight: 100
port:
targetPort: http
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/kuberay-apiserver/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.name }}-service
name: {{ include "kuberay-apiserver.fullname" . }}-service
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/component: kuberay-apiserver
Expand Down
Loading
Loading