Skip to content

Commit b65e4a0

Browse files
authored
[Helm] Use helm-docs to generate README for chart api-server automatically (#3916)
* [Helm] Use helm-docs to generate README for chart api-server automatically Signed-off-by: win5923 <[email protected]> * Reslove comments * Update version --------- Signed-off-by: win5923 <[email protected]>
1 parent f2cfbb9 commit b65e4a0

File tree

5 files changed

+185
-23
lines changed

5 files changed

+185
-23
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ repos:
8989
# Make the tool search for charts only under the `helm-chart` directory
9090
- --chart-search-root=helm-chart
9191
- --chart-to-generate=helm-chart/kuberay-operator
92+
- --chart-to-generate=helm-chart/kuberay-apiserver
9293
- --chart-to-generate=helm-chart/ray-cluster
9394
- --template-files=README.md.gotmpl
9495
- --sort-values-order=file

helm-chart/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ helm-lint: ## Run Helm chart lint test.
6464
helm-docs: helm-docs-plugin ## Generates markdown documentation for Helm charts from requirements and values files.
6565
$(HELM_DOCS) --chart-search-root=$(WORKDIR) --chart-to-generate=$(KUBERAY_OPERATOR_CHART_PATH) --sort-values-order=file
6666
$(HELM_DOCS) --chart-search-root=$(WORKDIR) --chart-to-generate=$(RAY_CLUSTER_CHART_PATH) --sort-values-order=file
67+
$(HELM_DOCS) --chart-search-root=$(WORKDIR) --chart-to-generate=$(KUBERAY_APISERVER_CHART_PATH) --sort-values-order=file
6768

6869
##@ Dependencies
6970

helm-chart/kuberay-apiserver/README.md

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
# KubeRay API Server
1+
# KubeRay APIServer
22

3-
This document provides instructions to install the KubeRay API Server with a Helm chart.
3+
![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
4+
5+
A Helm chart for kuberay-apiserver
6+
7+
## Introduction
8+
9+
This document provides instructions to install the KubeRay APIServer with a Helm chart.
10+
KubeRay APIServer V2 is enabled by default, for more information,
11+
please refer to the [KubeRay APIServer V2 documentation].
412

513
## Helm
614

@@ -11,7 +19,7 @@ v3.9.4.
1119
helm version
1220
```
1321

14-
## Install KubeRay API Server
22+
## Install KubeRay APIServer
1523

1624
### Without security proxy
1725

@@ -21,7 +29,7 @@ helm version
2129
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
2230
helm repo update
2331
# Install KubeRay APIServer without security proxy
24-
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.0 --set security=null
32+
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2 --set security=null
2533
```
2634

2735
- Install the nightly version
@@ -32,7 +40,7 @@ helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.0 --set s
3240
# Step2: Navigate to `helm-chart/kuberay-apiserver`
3341
cd helm-chart/kuberay-apiserver
3442

35-
# Step3: Install the KubeRay apiserver
43+
# Step3: Install the KubeRay APIServer
3644
helm install kuberay-apiserver . --set security=null
3745
```
3846

@@ -44,7 +52,7 @@ helm install kuberay-apiserver . --set security=null
4452
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
4553
helm repo update
4654
# Install KubeRay APIServer
47-
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.0
55+
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2
4856
```
4957

5058
- Install the nightly version
@@ -55,7 +63,7 @@ helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.0
5563
# Step2: Navigate to `helm-chart/kuberay-apiserver`
5664
cd helm-chart/kuberay-apiserver
5765

58-
# Step3: Install the KubeRay apiserver
66+
# Step3: Install the KubeRay APIServer
5967
helm install kuberay-apiserver .
6068
```
6169

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

7179
```sh
7280
helm ls
73-
# NAME NAMESPACE REVISION UPDATED STATUS CHART
74-
# kuberay-apiserver default 1 2022-12-02 02:13:37.514445313 +0000 UTC deployed kuberay-apiserver-1.1.0
81+
# NAME NAMESPACE REVISION UPDATED STATUS CHART
82+
# kuberay-apiserver default 1 2025-08-08 17:07:51.472353906 +0000 UTC deployed kuberay-apiserver-1.4.2
7583
```
7684

7785
## Uninstall the Chart
@@ -80,9 +88,49 @@ helm ls
8088
# Uninstall the `kuberay-apiserver` release
8189
helm uninstall kuberay-apiserver
8290

83-
# The API Server Pod should be removed.
91+
# The APIServer Pod should be removed.
8492
kubectl get pods
8593
# No resources found in default namespace.
8694
```
8795

88-
[existing CI tests]: https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm-lint.yaml
96+
[existing CI tests]: https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm.yaml
97+
[KubeRay APIServer V2 documentation]: https://github.com/ray-project/kuberay/blob/master/apiserversdk/README.md
98+
99+
## Values
100+
101+
| Key | Type | Default | Description |
102+
|-----|------|---------|-------------|
103+
| replicaCount | int | `1` | |
104+
| name | string | `"kuberay-apiserver"` | |
105+
| image.repository | string | `"quay.io/kuberay/apiserver"` | Image repository. |
106+
| image.tag | string | `"nightly"` | Image tag. |
107+
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. |
108+
| cors | string | `nil` | |
109+
| labels | object | `{}` | Extra labels. |
110+
| annotations | object | `{}` | Extra annotations. |
111+
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created. |
112+
| 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 |
113+
| containerPort[0].name | string | `"http"` | |
114+
| containerPort[0].containerPort | int | `8888` | |
115+
| containerPort[0].protocol | string | `"TCP"` | |
116+
| containerPort[1].name | string | `"grpc"` | |
117+
| containerPort[1].containerPort | int | `8887` | |
118+
| containerPort[1].protocol | string | `"TCP"` | |
119+
| resources | object | `{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"300m","memory":"300Mi"}}` | Resource requests and limits for containers. |
120+
| sidecarContainers | list | `[]` | Sidecar containers to run along with the main container. |
121+
| nodeSelector | object | `{}` | Node selector for pods. |
122+
| affinity | object | `{}` | Affinity for pods. |
123+
| tolerations | list | `[]` | Tolerations for pods. |
124+
| service.type | string | `"ClusterIP"` | Service type. |
125+
| service.ports | list | `[{"name":"http","port":8888,"protocol":"TCP","targetPort":8888},{"name":"rpc","port":8887,"protocol":"TCP","targetPort":8887}]` | Service port. |
126+
| ingress.enabled | bool | `false` | |
127+
| ingress.annotations | object | `{}` | |
128+
| ingress.className | string | `""` | |
129+
| ingress.tls | list | `[]` | |
130+
| route.enabled | bool | `false` | |
131+
| route.annotations | object | `{}` | |
132+
| rbacEnable | bool | `true` | Install Default RBAC roles and bindings |
133+
| singleNamespaceInstall | bool | `false` | The chart can be installed by users with permissions to a single namespace only |
134+
| enableAPIServerV2 | bool | `true` | If set to true, APIServer v2 would be served on the same port as the APIServer v1. |
135+
| security.proxy | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/kuberay/security-proxy","tag":"nightly"}` | security proxy image. |
136+
| security.env | object | `{"ENABLE_GRPC":"true","GRPC_LOCAL_PORT":8987,"HTTP_LOCAL_PORT":8988,"SECURITY_PREFIX":"/","SECURITY_TOKEN":"12345"}` | security proxy environment variables. |
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# KubeRay APIServer
2+
3+
{{ template "chart.deprecationWarning" . }}
4+
5+
{{ template "chart.badgesSection" . }}
6+
7+
{{ template "chart.description" . }}
8+
9+
{{ template "chart.homepageLine" . }}
10+
11+
## Introduction
12+
13+
This document provides instructions to install the KubeRay APIServer with a Helm chart.
14+
KubeRay APIServer V2 is enabled by default, for more information,
15+
please refer to the [KubeRay APIServer V2 documentation].
16+
17+
18+
## Helm
19+
20+
Make sure the version of Helm is v3+. Currently, [existing CI tests] are based on Helm v3.4.1 and
21+
v3.9.4.
22+
23+
```sh
24+
helm version
25+
```
26+
27+
## Install KubeRay APIServer
28+
29+
### Without security proxy
30+
31+
- Install a stable version via Helm repository
32+
33+
```sh
34+
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
35+
helm repo update
36+
# Install KubeRay APIServer without security proxy
37+
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2 --set security=null
38+
```
39+
40+
- Install the nightly version
41+
42+
```sh
43+
# Step1: Clone KubeRay repository
44+
45+
# Step2: Navigate to `helm-chart/kuberay-apiserver`
46+
cd helm-chart/kuberay-apiserver
47+
48+
# Step3: Install the KubeRay APIServer
49+
helm install kuberay-apiserver . --set security=null
50+
```
51+
52+
### With security proxy
53+
54+
- Install a stable version via Helm repository
55+
56+
```sh
57+
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
58+
helm repo update
59+
# Install KubeRay APIServer
60+
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 1.4.2
61+
```
62+
63+
- Install the nightly version
64+
65+
```sh
66+
# Step1: Clone KubeRay repository
67+
68+
# Step2: Navigate to `helm-chart/kuberay-apiserver`
69+
cd helm-chart/kuberay-apiserver
70+
71+
# Step3: Install the KubeRay APIServer
72+
helm install kuberay-apiserver .
73+
```
74+
75+
> [!IMPORTANT]
76+
> If you receive an "Unauthorized" error when making a request, please add an
77+
> authorization header to the request: `-H 'Authorization: 12345'` or install the
78+
> APIServer without a security proxy.
79+
80+
## List the chart
81+
82+
To list the `kuberay-apiserver` release:
83+
84+
```sh
85+
helm ls
86+
# NAME NAMESPACE REVISION UPDATED STATUS CHART
87+
# kuberay-apiserver default 1 2025-08-08 17:07:51.472353906 +0000 UTC deployed kuberay-apiserver-1.4.2
88+
```
89+
90+
## Uninstall the Chart
91+
92+
```sh
93+
# Uninstall the `kuberay-apiserver` release
94+
helm uninstall kuberay-apiserver
95+
96+
# The APIServer Pod should be removed.
97+
kubectl get pods
98+
# No resources found in default namespace.
99+
```
100+
101+
[existing CI tests]: https://github.com/ray-project/kuberay/blob/master/.github/workflows/helm.yaml
102+
[KubeRay APIServer V2 documentation]: https://github.com/ray-project/kuberay/blob/master/apiserversdk/README.md
103+
104+
{{ template "chart.valuesSection" . }}

helm-chart/kuberay-apiserver/values.yaml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ replicaCount: 1
77
name: kuberay-apiserver
88

99
image:
10+
# -- Image repository.
1011
repository: quay.io/kuberay/apiserver
12+
# -- Image tag.
1113
tag: nightly
14+
# -- Image pull policy.
1215
pullPolicy: IfNotPresent
1316

1417
# Uncomment allowOrigin to enable CORS
1518
# It'll set the Access-Control-Allow-Origin response header for the HTTP proxy.
1619
cors:
1720
# allowOrigin: "*"
1821

19-
labels:
22+
# -- Extra labels.
23+
labels: {}
2024
# key1: value1
2125
# key2: value2
2226

23-
annotations:
27+
# -- Extra annotations.
28+
annotations: {}
2429
# key1: value1
2530
# key2: value2
2631

27-
## Install Default RBAC roles and bindings
28-
rbac:
29-
create: true
30-
apiVersion: v1
31-
3232
serviceAccount:
33-
# Specifies whether a service account should be created
33+
# -- Specifies whether a service account should be created.
3434
create: true
35-
# The name of the service account to use.
35+
# -- The name of the service account to use.
3636
# If not set and create is true, a name is generated using the fullname template
3737
name: kuberay-apiserver
3838

@@ -44,6 +44,7 @@ containerPort:
4444
containerPort: 8887
4545
protocol: TCP
4646

47+
# -- Resource requests and limits for containers.
4748
resources:
4849
limits:
4950
cpu: 500m
@@ -66,8 +67,9 @@ tolerations: []
6667

6768
# Only one service type needs to be picked
6869
service:
69-
# ClusterIP service
70+
# -- Service type.
7071
type: ClusterIP
72+
# -- Service port.
7173
ports:
7274
- name: http
7375
protocol: TCP
@@ -84,27 +86,33 @@ service:
8486
ingress:
8587
enabled: false
8688
annotations: {}
89+
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
90+
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
8791
className: ""
8892
tls: []
8993

94+
# openshift routes
9095
route:
9196
enabled: false
9297
annotations: {}
9398

99+
# -- Install Default RBAC roles and bindings
94100
rbacEnable: true
95101

96-
# the chart can be installed by users with permissions to a single namespace only
102+
# -- The chart can be installed by users with permissions to a single namespace only
97103
singleNamespaceInstall: false
98104

99-
# If set to true, API server v2 would be served on the same port as the API server v1.
105+
# -- If set to true, APIServer v2 would be served on the same port as the APIServer v1.
100106
enableAPIServerV2: true
101107

102108
# security definition. Comment it out if security is not required
103109
security:
110+
# -- security proxy image.
104111
proxy:
105112
repository: quay.io/kuberay/security-proxy
106113
tag: nightly
107114
pullPolicy: IfNotPresent
115+
# -- security proxy environment variables.
108116
env:
109117
HTTP_LOCAL_PORT: 8988
110118
GRPC_LOCAL_PORT: 8987

0 commit comments

Comments
 (0)