From c18c2a86f239187372ebe2f9e2a14e110d083c3a Mon Sep 17 00:00:00 2001 From: zhuang Date: Fri, 3 Dec 2021 15:10:23 +0800 Subject: [PATCH 1/3] Add helm chart --- helm-chart/ray-cluster-helm/.helmignore | 22 ++++ helm-chart/ray-cluster-helm/Chart.yaml | 6 ++ helm-chart/ray-cluster-helm/README.md | 65 ++++++++++++ .../ray-cluster-helm/templates/_helpers.tpl | 56 ++++++++++ .../templates/raycluster-cluster.yaml | 71 +++++++++++++ helm-chart/ray-cluster-helm/values.yaml | 100 ++++++++++++++++++ helm-chart/ray-operator-helm/.helmignore | 22 ++++ helm-chart/ray-operator-helm/Chart.yaml | 7 ++ helm-chart/ray-operator-helm/README.md | 40 +++++++ .../ray-operator-helm/templates/_helpers.tpl | 56 ++++++++++ .../templates/deployment.yaml | 62 +++++++++++ .../ray-operator-helm/templates/role.yaml | 51 +++++++++ .../templates/rolebinding.yaml | 16 +++ .../ray-operator-helm/templates/service.yaml | 16 +++ .../templates/serviceaccount.yaml | 8 ++ helm-chart/ray-operator-helm/values.yaml | 47 ++++++++ 16 files changed, 645 insertions(+) create mode 100644 helm-chart/ray-cluster-helm/.helmignore create mode 100644 helm-chart/ray-cluster-helm/Chart.yaml create mode 100644 helm-chart/ray-cluster-helm/README.md create mode 100644 helm-chart/ray-cluster-helm/templates/_helpers.tpl create mode 100644 helm-chart/ray-cluster-helm/templates/raycluster-cluster.yaml create mode 100644 helm-chart/ray-cluster-helm/values.yaml create mode 100644 helm-chart/ray-operator-helm/.helmignore create mode 100644 helm-chart/ray-operator-helm/Chart.yaml create mode 100644 helm-chart/ray-operator-helm/README.md create mode 100644 helm-chart/ray-operator-helm/templates/_helpers.tpl create mode 100644 helm-chart/ray-operator-helm/templates/deployment.yaml create mode 100644 helm-chart/ray-operator-helm/templates/role.yaml create mode 100644 helm-chart/ray-operator-helm/templates/rolebinding.yaml create mode 100644 helm-chart/ray-operator-helm/templates/service.yaml create mode 100644 helm-chart/ray-operator-helm/templates/serviceaccount.yaml create mode 100644 helm-chart/ray-operator-helm/values.yaml diff --git a/helm-chart/ray-cluster-helm/.helmignore b/helm-chart/ray-cluster-helm/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/helm-chart/ray-cluster-helm/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm-chart/ray-cluster-helm/Chart.yaml b/helm-chart/ray-cluster-helm/Chart.yaml new file mode 100644 index 0000000000..ffa7c9950e --- /dev/null +++ b/helm-chart/ray-cluster-helm/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: ray-cluster-helm +version: 0.1.0 +icon: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png diff --git a/helm-chart/ray-cluster-helm/README.md b/helm-chart/ray-cluster-helm/README.md new file mode 100644 index 0000000000..e1a8234096 --- /dev/null +++ b/helm-chart/ray-cluster-helm/README.md @@ -0,0 +1,65 @@ +# Ray Cluster + +Make sure ray-operator has been deployed. + +[Ray](https://ray.io/) is An open source framework that provides a simple, universal API for building distributed applications. Ray is packaged with RLlib, a scalable reinforcement learning library, and Tune, a scalable hyperparameter tuning library. + +## Helm + +```console +$ helm version +version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa28009b71", GitTreeState:"dirty", GoVersion:"go1.16.5"} +``` + +## TL;DR; + +```console +helm install --name ray-cluster-helm . --values values.yaml --namespace default +``` + +## Installing the Chart + +To install the chart with the release name `my-release`: + + +```console +helm install --name sample ray-cluster-helm --values ray-cluster-helm/values.yaml --namespace default +``` + +> note: The chart will submit a RayCluster. + + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +helm delete ray-cluster-helm +``` + +The command removes nearly all the Kubernetes components associated with the +chart and deletes the release. + +## Check Cluster status + +### Get Service + +```console +$ kubectl get svc -l ray.io/cluster=ray-cluster-helm +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +ray-cluster-helm-head-svc ClusterIP 10.103.36.68 10001/TCP,6379/TCP,8265/TCP 9m24s +``` + +## Forward to dashboard + +```console +$ kubectl get pod -o wide +NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES +ray-cluster-helm-head-sd77l 1/1 Running 0 8h 10.1.61.208 docker-desktop +ray-cluster-helm-worker-workergroup-czxd6 1/1 Running 0 8h 10.1.61.207 docker-desktop +ray-operator-helm-687785b964-jgfhv 1/1 Running 6 3d4h 10.1.61.196 docker-desktop + +$ kubectl port-forward ray-cluster-helm-head-sd77l 8265 +Forwarding from 127.0.0.1:8265 -> 8265 +Forwarding from [::1]:8265 -> 8265 +``` diff --git a/helm-chart/ray-cluster-helm/templates/_helpers.tpl b/helm-chart/ray-cluster-helm/templates/_helpers.tpl new file mode 100644 index 0000000000..ecd4b69888 --- /dev/null +++ b/helm-chart/ray-cluster-helm/templates/_helpers.tpl @@ -0,0 +1,56 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ray-cluster-helm.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ray-cluster-helm.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ray-cluster-helm.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "ray-cluster-helm.labels" -}} +app.kubernetes.io/name: {{ include "ray-cluster-helm.name" . }} +helm.sh/chart: {{ include "ray-cluster-helm.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ray-cluster-helm.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "ray-cluster-helm.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/helm-chart/ray-cluster-helm/templates/raycluster-cluster.yaml b/helm-chart/ray-cluster-helm/templates/raycluster-cluster.yaml new file mode 100644 index 0000000000..ef6913c203 --- /dev/null +++ b/helm-chart/ray-cluster-helm/templates/raycluster-cluster.yaml @@ -0,0 +1,71 @@ +apiVersion: ray.io/v1alpha1 +kind: RayCluster +metadata: + labels: +{{ include "ray-cluster-helm.labels" . | indent 4 }} + name: {{ include "ray-cluster-helm.fullname" . }} +spec: + headGroupSpec: + serviceType: ClusterIP + rayStartParams: + {{- range $key, $val := .Values.head.initArgs }} + {{ $key }}: {{ $val | quote }} + {{- end }} + replicas: {{ .Values.head.replicas }} + template: + spec: + containers: + - volumeMounts: {{- toYaml .Values.head.volumeMounts | nindent 12 }} + name: ray-head + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + resources: {{- toYaml .Values.head.resources | nindent 14 }} + env: + - name: TYPE + value: head + {{- toYaml .Values.head.containerEnv | nindent 14}} + volumes: {{- toYaml .Values.head.volumes | nindent 10 }} + affinity: {{- toYaml .Values.head.affinity | nindent 10 }} + metadata: + annotation: {{- toYaml .Values.head.annotations | nindent 10 }} + labels: + groupName: {{ .Values.head.groupName }} + rayNodeType: {{ .Values.head.type }} + rayCluster: {{ include "ray-cluster-helm.fullname" . }} +{{ include "ray-cluster-helm.labels" . | indent 10 }} + + workerGroupSpecs: + - rayStartParams: + {{- range $key, $val := .Values.worker.initArgs }} + {{ $key }}: {{ $val | quote }} + {{- end }} + replicas: {{ .Values.worker.replicas }} + minReplicas: {{ .Values.worker.miniReplicas | default 1 }} + maxReplicas: {{ .Values.worker.maxiReplicas | default 2147483647 }} + groupName: {{ .Values.worker.groupName }} + template: + spec: + initContainers: + - name: init-myservice + image: busybox:1.28 + command: ['sh', '-c', "until nslookup $RAY_IP.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"] + containers: + - volumeMounts: {{- toYaml .Values.worker.volumeMounts | nindent 12 }} + name: ray-worker + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + resources: {{- toYaml .Values.worker.resources | nindent 14 }} + env: + - name: TYPE + value: worker + {{- toYaml .Values.worker.containerEnv | nindent 14}} + ports: {{- toYaml .Values.worker.ports | nindent 14}} + volumes: {{- toYaml .Values.worker.volumes | nindent 10 }} + affinity: {{- toYaml .Values.worker.affinity | nindent 10 }} + metadata: + annotation: {{- toYaml .Values.worker.annotations | nindent 10 }} + labels: + rayNodeType: {{ .Values.worker.type }} + groupName: {{ .Values.worker.groupName }} + rayCluster: {{ include "ray-cluster-helm.fullname" . }} +{{ include "ray-cluster-helm.labels" . | indent 10 }} \ No newline at end of file diff --git a/helm-chart/ray-cluster-helm/values.yaml b/helm-chart/ray-cluster-helm/values.yaml new file mode 100644 index 0000000000..01095d9706 --- /dev/null +++ b/helm-chart/ray-cluster-helm/values.yaml @@ -0,0 +1,100 @@ +# Default values for ray-cluster-helm. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +image: + repository: rayproject/ray + tag: latest + pullPolicy: IfNotPresent + +nameOverride: "ray" +fullnameOverride: "" + +head: + groupName: headgroup + replicas: 1 + type: head + labels: + key: value + initArgs: + port: '6379' + object-manager-port: '12345' + node-manager-port: '12346' + object-store-memory: '100000000' + redis-password: 'LetMeInRay' + dashboard-host: '0.0.0.0' + num-cpus: '1' # can be auto-completed from the limits + node-ip-address: $MY_POD_IP # auto-completed as the head pod IP + containerEnv: + - name: MY_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + resources: + limits: + cpu: 1 + requests: + cpu: 200m + annotations: {} + volumes: + - name: config + configMap: + name: ray-code + items: + - key: code.py + path: code.py + volumeMounts: + - mountPath: /opt + name: config + + +worker: + groupName: workergroup + replicas: 1 + type: worker + labels: + key: value + initArgs: + node-ip-address: $MY_POD_IP + redis-password: LetMeInRay + containerEnv: + - name: MY_POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: RAY_DISABLE_DOCKER_CPU_WARNING + value: "1" + - name: CPU_REQUEST + valueFrom: + resourceFieldRef: + containerName: ray-worker + resource: requests.cpu + - name: MY_POD_NAME + valueFrom: + fieldRef: + fieldPath: metadata.name + ports: + - containerPort: 80 + protocol: TCP + resources: + limits: + cpu: 1 + requests: + cpu: 200m + annotations: + key: value + nodeSelector: {} + tolerations: [] + affinity: {} + volumes: + - name: log-volume + emptyDir: {} + volumeMounts: + - mountPath: /var/log + name: log-volume + +headServiceSuffix: "ray-operator.svc" + +service: + type: ClusterIP + port: 8080 diff --git a/helm-chart/ray-operator-helm/.helmignore b/helm-chart/ray-operator-helm/.helmignore new file mode 100644 index 0000000000..50af031725 --- /dev/null +++ b/helm-chart/ray-operator-helm/.helmignore @@ -0,0 +1,22 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm-chart/ray-operator-helm/Chart.yaml b/helm-chart/ray-operator-helm/Chart.yaml new file mode 100644 index 0000000000..3351711e1c --- /dev/null +++ b/helm-chart/ray-operator-helm/Chart.yaml @@ -0,0 +1,7 @@ +apiVersion: v2 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: ray-operator-helm +version: 0.1.0 +icon: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png +type: application diff --git a/helm-chart/ray-operator-helm/README.md b/helm-chart/ray-operator-helm/README.md new file mode 100644 index 0000000000..8cef6ecfbb --- /dev/null +++ b/helm-chart/ray-operator-helm/README.md @@ -0,0 +1,40 @@ +# Ray Operator + +Ray-Operator-Helm: A simple Helm chart + +Run a deployment of Ray Operator. + +Deploy ray operator first, then deploy ray cluster. + +## Helm + +Make sure helm version is v3+ +```console +$ helm version +version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa28009b71", GitTreeState:"dirty", GoVersion:"go1.16.5"} +``` + +## Installing the Chart + +Please use command below: +```console +$ helm install ray-operator-helm . --values values.yaml --namespace default --create-namespace +``` +## List the Chart + +To list the `my-release` deployment: + +```console +$ helm list -n default +``` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +$ helm delete ray-operator-helm +``` + +The command removes nearly all the Kubernetes components associated with the +chart and deletes the release. \ No newline at end of file diff --git a/helm-chart/ray-operator-helm/templates/_helpers.tpl b/helm-chart/ray-operator-helm/templates/_helpers.tpl new file mode 100644 index 0000000000..a00cff2f55 --- /dev/null +++ b/helm-chart/ray-operator-helm/templates/_helpers.tpl @@ -0,0 +1,56 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ray-operator-helm.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ray-operator-helm.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ray-operator-helm.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "ray-operator-helm.labels" -}} +app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} +helm.sh/chart: {{ include "ray-operator-helm.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ray-operator-helm.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "ray-operator-helm.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/helm-chart/ray-operator-helm/templates/deployment.yaml b/helm-chart/ray-operator-helm/templates/deployment.yaml new file mode 100644 index 0000000000..e50497679c --- /dev/null +++ b/helm-chart/ray-operator-helm/templates/deployment.yaml @@ -0,0 +1,62 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ray-operator-helm.fullname" . }} + labels: +{{ include "ray-operator-helm.labels" . | indent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ .Values.serviceAccount.name }} + volumes: [] + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: [] + command: + - /manager + ports: + - name: http + containerPort: 8080 + protocol: TCP + env: [] + livenessProbe: + httpGet: + path: /metrics + port: http + readinessProbe: + httpGet: + path: /metrics + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/helm-chart/ray-operator-helm/templates/role.yaml b/helm-chart/ray-operator-helm/templates/role.yaml new file mode 100644 index 0000000000..f437e58b73 --- /dev/null +++ b/helm-chart/ray-operator-helm/templates/role.yaml @@ -0,0 +1,51 @@ +{{- if .Values.rbacEnable }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: +{{ include "ray-operator-helm.labels" . | indent 4 }} + name: {{ include "ray-operator-helm.fullname" . }} +rules: +- apiGroups: + - "" + resources: + - pods + - pods/log + - pods/status + - pods/exec + - services + - endpoints + - persistentvolumeclaims + - events + - configmaps + - secrets + verbs: + - "*" +- apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - apps + resources: + - deployments + - deployments/status + - daemonsets + - replicasets + - statefulsets + - statefulsets/status + verbs: + - "*" +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch +{{- end }} diff --git a/helm-chart/ray-operator-helm/templates/rolebinding.yaml b/helm-chart/ray-operator-helm/templates/rolebinding.yaml new file mode 100644 index 0000000000..bf649bd912 --- /dev/null +++ b/helm-chart/ray-operator-helm/templates/rolebinding.yaml @@ -0,0 +1,16 @@ +{{- if .Values.rbacEnable }} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + labels: +{{ include "ray-operator-helm.labels" . | indent 4 }} + name: {{ include "ray-operator-helm.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ .Values.serviceAccount.name }} + namespace: {{ .Release.Namespace }} +roleRef: + kind: ClusterRole + name: {{ include "ray-operator-helm.fullname" . }} + apiGroup: rbac.authorization.k8s.io +{{- end }} diff --git a/helm-chart/ray-operator-helm/templates/service.yaml b/helm-chart/ray-operator-helm/templates/service.yaml new file mode 100644 index 0000000000..795e871471 --- /dev/null +++ b/helm-chart/ray-operator-helm/templates/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "ray-operator-helm.fullname" . }} + labels: +{{ include "ray-operator-helm.labels" . | indent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/helm-chart/ray-operator-helm/templates/serviceaccount.yaml b/helm-chart/ray-operator-helm/templates/serviceaccount.yaml new file mode 100644 index 0000000000..9fe3fcf780 --- /dev/null +++ b/helm-chart/ray-operator-helm/templates/serviceaccount.yaml @@ -0,0 +1,8 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "ray-operator-helm.serviceAccountName" . }} + labels: +{{ include "ray-operator-helm.labels" . | indent 4 }} +{{- end -}} diff --git a/helm-chart/ray-operator-helm/values.yaml b/helm-chart/ray-operator-helm/values.yaml new file mode 100644 index 0000000000..3a85f0bb64 --- /dev/null +++ b/helm-chart/ray-operator-helm/values.yaml @@ -0,0 +1,47 @@ +# Default values for ray-operator-helm. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: docker.io/library/controller + tag: latest + pullPolicy: IfNotPresent + +nameOverride: "ray-operator-helm" +fullnameOverride: "ray-operator-helm" + +## Install Default RBAC roles and bindings +rbac: + create: true + apiVersion: v1 + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "ray-operator" + +service: + type: ClusterIP + port: 8080 + +ingress: + enabled: false + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do whelm to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 100m + memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +createCustomResource: true +rbacEnable: true From b93b5d067a327f124d7c5a6b8ff6138935f03d15 Mon Sep 17 00:00:00 2001 From: zhuang Date: Tue, 7 Dec 2021 10:40:23 +0800 Subject: [PATCH 2/3] fix --- .../.helmignore | 0 .../Chart.yaml | 2 +- .../README.md | 6 +++--- .../templates/_helpers.tpl | 16 +++++++-------- .../templates/deployment.yaml | 8 ++++---- .../templates/role.yaml | 4 ++-- .../templates/rolebinding.yaml | 6 +++--- .../templates/service.yaml | 6 +++--- .../templates/serviceaccount.yaml | 8 ++++++++ .../values.yaml | 6 +++--- .../.helmignore | 0 .../Chart.yaml | 2 +- .../README.md | 20 +++++++++---------- .../templates/_helpers.tpl | 16 +++++++-------- .../templates/raycluster-cluster.yaml | 12 +++++------ .../values.yaml | 2 +- .../templates/serviceaccount.yaml | 8 -------- 17 files changed, 61 insertions(+), 61 deletions(-) rename helm-chart/{ray-cluster-helm => kubray-operator}/.helmignore (100%) rename helm-chart/{ray-operator-helm => kubray-operator}/Chart.yaml (89%) rename helm-chart/{ray-operator-helm => kubray-operator}/README.md (80%) rename helm-chart/{ray-cluster-helm => kubray-operator}/templates/_helpers.tpl (76%) rename helm-chart/{ray-operator-helm => kubray-operator}/templates/deployment.yaml (87%) rename helm-chart/{ray-operator-helm => kubray-operator}/templates/role.yaml (85%) rename helm-chart/{ray-operator-helm => kubray-operator}/templates/rolebinding.yaml (65%) rename helm-chart/{ray-operator-helm => kubray-operator}/templates/service.yaml (59%) create mode 100644 helm-chart/kubray-operator/templates/serviceaccount.yaml rename helm-chart/{ray-operator-helm => kubray-operator}/values.yaml (90%) rename helm-chart/{ray-operator-helm => ray-cluster}/.helmignore (100%) rename helm-chart/{ray-cluster-helm => ray-cluster}/Chart.yaml (88%) rename helm-chart/{ray-cluster-helm => ray-cluster}/README.md (58%) rename helm-chart/{ray-operator-helm => ray-cluster}/templates/_helpers.tpl (76%) rename helm-chart/{ray-cluster-helm => ray-cluster}/templates/raycluster-cluster.yaml (88%) rename helm-chart/{ray-cluster-helm => ray-cluster}/values.yaml (98%) delete mode 100644 helm-chart/ray-operator-helm/templates/serviceaccount.yaml diff --git a/helm-chart/ray-cluster-helm/.helmignore b/helm-chart/kubray-operator/.helmignore similarity index 100% rename from helm-chart/ray-cluster-helm/.helmignore rename to helm-chart/kubray-operator/.helmignore diff --git a/helm-chart/ray-operator-helm/Chart.yaml b/helm-chart/kubray-operator/Chart.yaml similarity index 89% rename from helm-chart/ray-operator-helm/Chart.yaml rename to helm-chart/kubray-operator/Chart.yaml index 3351711e1c..60a0af1232 100644 --- a/helm-chart/ray-operator-helm/Chart.yaml +++ b/helm-chart/kubray-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: "1.0" description: A Helm chart for Kubernetes -name: ray-operator-helm +name: kubray-operator version: 0.1.0 icon: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png type: application diff --git a/helm-chart/ray-operator-helm/README.md b/helm-chart/kubray-operator/README.md similarity index 80% rename from helm-chart/ray-operator-helm/README.md rename to helm-chart/kubray-operator/README.md index 8cef6ecfbb..f3ee2ad87a 100644 --- a/helm-chart/ray-operator-helm/README.md +++ b/helm-chart/kubray-operator/README.md @@ -1,6 +1,6 @@ # Ray Operator -Ray-Operator-Helm: A simple Helm chart +KubRay-Operator: A simple Helm chart Run a deployment of Ray Operator. @@ -18,7 +18,7 @@ version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa2 Please use command below: ```console -$ helm install ray-operator-helm . --values values.yaml --namespace default --create-namespace +$ helm install kubray-operator . --values values.yaml --namespace default --create-namespace ``` ## List the Chart @@ -33,7 +33,7 @@ $ helm list -n default To uninstall/delete the `my-release` deployment: ```console -$ helm delete ray-operator-helm +$ helm delete kubray-operator ``` The command removes nearly all the Kubernetes components associated with the diff --git a/helm-chart/ray-cluster-helm/templates/_helpers.tpl b/helm-chart/kubray-operator/templates/_helpers.tpl similarity index 76% rename from helm-chart/ray-cluster-helm/templates/_helpers.tpl rename to helm-chart/kubray-operator/templates/_helpers.tpl index ecd4b69888..1f45d8237f 100644 --- a/helm-chart/ray-cluster-helm/templates/_helpers.tpl +++ b/helm-chart/kubray-operator/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "ray-cluster-helm.name" -}} +{{- define "kubray-operator.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "ray-cluster-helm.fullname" -}} +{{- define "kubray-operator.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "ray-cluster-helm.chart" -}} +{{- define "kubray-operator.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "ray-cluster-helm.labels" -}} -app.kubernetes.io/name: {{ include "ray-cluster-helm.name" . }} -helm.sh/chart: {{ include "ray-cluster-helm.chart" . }} +{{- define "kubray-operator.labels" -}} +app.kubernetes.io/name: {{ include "kubray-operator.name" . }} +helm.sh/chart: {{ include "kubray-operator.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} @@ -47,9 +47,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Create the name of the service account to use */}} -{{- define "ray-cluster-helm.serviceAccountName" -}} +{{- define "kubray-operator.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "ray-cluster-helm.fullname" .) .Values.serviceAccount.name }} + {{ default (include "kubray-operator.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/helm-chart/ray-operator-helm/templates/deployment.yaml b/helm-chart/kubray-operator/templates/deployment.yaml similarity index 87% rename from helm-chart/ray-operator-helm/templates/deployment.yaml rename to helm-chart/kubray-operator/templates/deployment.yaml index e50497679c..c5c5aed20f 100644 --- a/helm-chart/ray-operator-helm/templates/deployment.yaml +++ b/helm-chart/kubray-operator/templates/deployment.yaml @@ -1,19 +1,19 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "ray-operator-helm.fullname" . }} + name: {{ include "kubray-operator.fullname" . }} labels: -{{ include "ray-operator-helm.labels" . | indent 4 }} +{{ include "kubray-operator.labels" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} + app.kubernetes.io/name: {{ include "kubray-operator.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} template: metadata: labels: - app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} + app.kubernetes.io/name: {{ include "kubray-operator.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} spec: {{- with .Values.imagePullSecrets }} diff --git a/helm-chart/ray-operator-helm/templates/role.yaml b/helm-chart/kubray-operator/templates/role.yaml similarity index 85% rename from helm-chart/ray-operator-helm/templates/role.yaml rename to helm-chart/kubray-operator/templates/role.yaml index f437e58b73..9ffdbdc682 100644 --- a/helm-chart/ray-operator-helm/templates/role.yaml +++ b/helm-chart/kubray-operator/templates/role.yaml @@ -3,8 +3,8 @@ kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: labels: -{{ include "ray-operator-helm.labels" . | indent 4 }} - name: {{ include "ray-operator-helm.fullname" . }} +{{ include "kubray-operator.labels" . | indent 4 }} + name: {{ include "kubray-operator.fullname" . }} rules: - apiGroups: - "" diff --git a/helm-chart/ray-operator-helm/templates/rolebinding.yaml b/helm-chart/kubray-operator/templates/rolebinding.yaml similarity index 65% rename from helm-chart/ray-operator-helm/templates/rolebinding.yaml rename to helm-chart/kubray-operator/templates/rolebinding.yaml index bf649bd912..5c0f17cdf5 100644 --- a/helm-chart/ray-operator-helm/templates/rolebinding.yaml +++ b/helm-chart/kubray-operator/templates/rolebinding.yaml @@ -3,14 +3,14 @@ kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: labels: -{{ include "ray-operator-helm.labels" . | indent 4 }} - name: {{ include "ray-operator-helm.fullname" . }} +{{ include "kubray-operator.labels" . | indent 4 }} + name: {{ include "kubray-operator.fullname" . }} subjects: - kind: ServiceAccount name: {{ .Values.serviceAccount.name }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole - name: {{ include "ray-operator-helm.fullname" . }} + name: {{ include "kubray-operator.fullname" . }} apiGroup: rbac.authorization.k8s.io {{- end }} diff --git a/helm-chart/ray-operator-helm/templates/service.yaml b/helm-chart/kubray-operator/templates/service.yaml similarity index 59% rename from helm-chart/ray-operator-helm/templates/service.yaml rename to helm-chart/kubray-operator/templates/service.yaml index 795e871471..59986fa207 100644 --- a/helm-chart/ray-operator-helm/templates/service.yaml +++ b/helm-chart/kubray-operator/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "ray-operator-helm.fullname" . }} + name: {{ include "kubray-operator.fullname" . }} labels: -{{ include "ray-operator-helm.labels" . | indent 4 }} +{{ include "kubray-operator.labels" . | indent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -12,5 +12,5 @@ spec: protocol: TCP name: http selector: - app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} + app.kubernetes.io/name: {{ include "kubray-operator.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/helm-chart/kubray-operator/templates/serviceaccount.yaml b/helm-chart/kubray-operator/templates/serviceaccount.yaml new file mode 100644 index 0000000000..f36ae84228 --- /dev/null +++ b/helm-chart/kubray-operator/templates/serviceaccount.yaml @@ -0,0 +1,8 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "kubray-operator.serviceAccountName" . }} + labels: +{{ include "kubray-operator.labels" . | indent 4 }} +{{- end -}} diff --git a/helm-chart/ray-operator-helm/values.yaml b/helm-chart/kubray-operator/values.yaml similarity index 90% rename from helm-chart/ray-operator-helm/values.yaml rename to helm-chart/kubray-operator/values.yaml index 3a85f0bb64..e5bb900fc3 100644 --- a/helm-chart/ray-operator-helm/values.yaml +++ b/helm-chart/kubray-operator/values.yaml @@ -1,4 +1,4 @@ -# Default values for ray-operator-helm. +# Default values for kubray-operator. # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -9,8 +9,8 @@ image: tag: latest pullPolicy: IfNotPresent -nameOverride: "ray-operator-helm" -fullnameOverride: "ray-operator-helm" +nameOverride: "kubray-operator" +fullnameOverride: "kubray-operator" ## Install Default RBAC roles and bindings rbac: diff --git a/helm-chart/ray-operator-helm/.helmignore b/helm-chart/ray-cluster/.helmignore similarity index 100% rename from helm-chart/ray-operator-helm/.helmignore rename to helm-chart/ray-cluster/.helmignore diff --git a/helm-chart/ray-cluster-helm/Chart.yaml b/helm-chart/ray-cluster/Chart.yaml similarity index 88% rename from helm-chart/ray-cluster-helm/Chart.yaml rename to helm-chart/ray-cluster/Chart.yaml index ffa7c9950e..558afcdc7f 100644 --- a/helm-chart/ray-cluster-helm/Chart.yaml +++ b/helm-chart/ray-cluster/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 appVersion: "1.0" description: A Helm chart for Kubernetes -name: ray-cluster-helm +name: ray-cluster version: 0.1.0 icon: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png diff --git a/helm-chart/ray-cluster-helm/README.md b/helm-chart/ray-cluster/README.md similarity index 58% rename from helm-chart/ray-cluster-helm/README.md rename to helm-chart/ray-cluster/README.md index e1a8234096..e7aa75b7ec 100644 --- a/helm-chart/ray-cluster-helm/README.md +++ b/helm-chart/ray-cluster/README.md @@ -2,7 +2,7 @@ Make sure ray-operator has been deployed. -[Ray](https://ray.io/) is An open source framework that provides a simple, universal API for building distributed applications. Ray is packaged with RLlib, a scalable reinforcement learning library, and Tune, a scalable hyperparameter tuning library. +[Ray](https://ray.io/) is an open source framework that provides a simple, universal API for building distributed applications. Ray is packaged with RLlib, a scalable reinforcement learning library, and Tune, a scalable hyperparameter tuning library. ## Helm @@ -14,7 +14,7 @@ version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa2 ## TL;DR; ```console -helm install --name ray-cluster-helm . --values values.yaml --namespace default +helm install --name ray-cluster . --values values.yaml --namespace default ``` ## Installing the Chart @@ -23,7 +23,7 @@ To install the chart with the release name `my-release`: ```console -helm install --name sample ray-cluster-helm --values ray-cluster-helm/values.yaml --namespace default +helm install --name sample ray-cluster --values ray-cluster/values.yaml --namespace default ``` > note: The chart will submit a RayCluster. @@ -34,7 +34,7 @@ helm install --name sample ray-cluster-helm --values ray-cluster-helm/values.yam To uninstall/delete the `my-release` deployment: ```console -helm delete ray-cluster-helm +helm delete ray-cluster ``` The command removes nearly all the Kubernetes components associated with the @@ -45,9 +45,9 @@ chart and deletes the release. ### Get Service ```console -$ kubectl get svc -l ray.io/cluster=ray-cluster-helm +$ kubectl get svc -l ray.io/cluster=ray-cluster NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -ray-cluster-helm-head-svc ClusterIP 10.103.36.68 10001/TCP,6379/TCP,8265/TCP 9m24s +ray-cluster-head-svc ClusterIP 10.103.36.68 10001/TCP,6379/TCP,8265/TCP 9m24s ``` ## Forward to dashboard @@ -55,11 +55,11 @@ ray-cluster-helm-head-svc ClusterIP 10.103.36.68 10001/TCP,6 ```console $ kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES -ray-cluster-helm-head-sd77l 1/1 Running 0 8h 10.1.61.208 docker-desktop -ray-cluster-helm-worker-workergroup-czxd6 1/1 Running 0 8h 10.1.61.207 docker-desktop -ray-operator-helm-687785b964-jgfhv 1/1 Running 6 3d4h 10.1.61.196 docker-desktop +ray-cluster-head-sd77l 1/1 Running 0 8h 10.1.61.208 docker-desktop +ray-cluster-worker-workergroup-czxd6 1/1 Running 0 8h 10.1.61.207 docker-desktop +kubray-operator-687785b964-jgfhv 1/1 Running 6 3d4h 10.1.61.196 docker-desktop -$ kubectl port-forward ray-cluster-helm-head-sd77l 8265 +$ kubectl port-forward ray-cluster-head-sd77l 8265 Forwarding from 127.0.0.1:8265 -> 8265 Forwarding from [::1]:8265 -> 8265 ``` diff --git a/helm-chart/ray-operator-helm/templates/_helpers.tpl b/helm-chart/ray-cluster/templates/_helpers.tpl similarity index 76% rename from helm-chart/ray-operator-helm/templates/_helpers.tpl rename to helm-chart/ray-cluster/templates/_helpers.tpl index a00cff2f55..38d0a90d5f 100644 --- a/helm-chart/ray-operator-helm/templates/_helpers.tpl +++ b/helm-chart/ray-cluster/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "ray-operator-helm.name" -}} +{{- define "ray-cluster.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "ray-operator-helm.fullname" -}} +{{- define "ray-cluster.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "ray-operator-helm.chart" -}} +{{- define "ray-cluster.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "ray-operator-helm.labels" -}} -app.kubernetes.io/name: {{ include "ray-operator-helm.name" . }} -helm.sh/chart: {{ include "ray-operator-helm.chart" . }} +{{- define "ray-cluster.labels" -}} +app.kubernetes.io/name: {{ include "ray-cluster.name" . }} +helm.sh/chart: {{ include "ray-cluster.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} @@ -47,9 +47,9 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Create the name of the service account to use */}} -{{- define "ray-operator-helm.serviceAccountName" -}} +{{- define "ray-cluster.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "ray-operator-helm.fullname" .) .Values.serviceAccount.name }} + {{ default (include "ray-cluster.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/helm-chart/ray-cluster-helm/templates/raycluster-cluster.yaml b/helm-chart/ray-cluster/templates/raycluster-cluster.yaml similarity index 88% rename from helm-chart/ray-cluster-helm/templates/raycluster-cluster.yaml rename to helm-chart/ray-cluster/templates/raycluster-cluster.yaml index ef6913c203..e0458a775b 100644 --- a/helm-chart/ray-cluster-helm/templates/raycluster-cluster.yaml +++ b/helm-chart/ray-cluster/templates/raycluster-cluster.yaml @@ -2,8 +2,8 @@ apiVersion: ray.io/v1alpha1 kind: RayCluster metadata: labels: -{{ include "ray-cluster-helm.labels" . | indent 4 }} - name: {{ include "ray-cluster-helm.fullname" . }} +{{ include "ray-cluster.labels" . | indent 4 }} + name: {{ include "ray-cluster.fullname" . }} spec: headGroupSpec: serviceType: ClusterIP @@ -31,8 +31,8 @@ spec: labels: groupName: {{ .Values.head.groupName }} rayNodeType: {{ .Values.head.type }} - rayCluster: {{ include "ray-cluster-helm.fullname" . }} -{{ include "ray-cluster-helm.labels" . | indent 10 }} + rayCluster: {{ include "ray-cluster.fullname" . }} +{{ include "ray-cluster.labels" . | indent 10 }} workerGroupSpecs: - rayStartParams: @@ -67,5 +67,5 @@ spec: labels: rayNodeType: {{ .Values.worker.type }} groupName: {{ .Values.worker.groupName }} - rayCluster: {{ include "ray-cluster-helm.fullname" . }} -{{ include "ray-cluster-helm.labels" . | indent 10 }} \ No newline at end of file + rayCluster: {{ include "ray-cluster.fullname" . }} +{{ include "ray-cluster.labels" . | indent 10 }} \ No newline at end of file diff --git a/helm-chart/ray-cluster-helm/values.yaml b/helm-chart/ray-cluster/values.yaml similarity index 98% rename from helm-chart/ray-cluster-helm/values.yaml rename to helm-chart/ray-cluster/values.yaml index 01095d9706..d9c1e2da12 100644 --- a/helm-chart/ray-cluster-helm/values.yaml +++ b/helm-chart/ray-cluster/values.yaml @@ -1,4 +1,4 @@ -# Default values for ray-cluster-helm. +# Default values for ray-cluster. # This is a YAML-formatted file. # Declare variables to be passed into your templates. diff --git a/helm-chart/ray-operator-helm/templates/serviceaccount.yaml b/helm-chart/ray-operator-helm/templates/serviceaccount.yaml deleted file mode 100644 index 9fe3fcf780..0000000000 --- a/helm-chart/ray-operator-helm/templates/serviceaccount.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "ray-operator-helm.serviceAccountName" . }} - labels: -{{ include "ray-operator-helm.labels" . | indent 4 }} -{{- end -}} From c20b133a7f967bef59e253cfed30a18b247b7309 Mon Sep 17 00:00:00 2001 From: zhuang Date: Fri, 10 Dec 2021 15:04:12 +0800 Subject: [PATCH 3/3] add README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 627de1fae6..fed00d814e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,11 @@ KubeRay provides several tools to improve running and managing Ray's experience - Operator Integration with Kubernetes node problem detector (future work) - Kubernetes based workspace to easily submit ray jobs (future work) +## Use helm chart + +A helm chart is a collection of files that describe a related set of Kubernetes resources. It can help users to deploy ray-operator and ray clusters conveniently. +Please read [kubray-operator](helm-chart/kubray-operator/README.md) to deploy an operator and [ray-cluster](helm-chart/ray-cluster/README.md) to deploy a custom cluster. + ## Development Please read our [CONTRIBUTING](CONTRIBUTING.md) guide before making a pull request. Refer to our [DEVELOPMENT](./ray-operator/DEVELOPMENT.md) to build and run tests locally.