Skip to content

Alex/fixes #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,6 @@
# Dependency directories (remove the comment below to include it)
**/vendor/

.ipynb_checkpoints
.ipynb_checkpoints

*tgz
13 changes: 12 additions & 1 deletion helm-chart/kuberay-apiserver/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,15 @@ spec:
{{- toYaml .Values.containerPort | nindent 8 }}
resources:
{{- toYaml .Values.resources | nindent 10 }}

{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
2 changes: 1 addition & 1 deletion helm-chart/kuberay-apiserver/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{{- if .Values.rbacEnable }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: Role
metadata:
labels:
app.kubernetes.io/name: {{ .Values.name }}
Expand Down
4 changes: 2 additions & 2 deletions helm-chart/kuberay-apiserver/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.rbacEnable }}
kind: ClusterRoleBinding
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
Expand All @@ -10,7 +10,7 @@ subjects:
name: {{ .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
kind: Role
name: {{ include "kuberay-apiserver.fullname" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
11 changes: 7 additions & 4 deletions helm-chart/kuberay-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ spec:
volumeMounts: []
command:
- /manager
args:
- --watch-namespace
- {{ (default .Values.watchNamespace .Release.Namespace) }}
ports:
- name: http
containerPort: 8080
Expand All @@ -60,11 +63,11 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# permissions for end users to edit rayjobs.
{{- if .Values.rbacEnable }}
kind: ClusterRole
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# permissions for end users to view rayjobs.
{{- if .Values.rbacEnable }}
kind: ClusterRole
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# permissions for end users to edit rayservices.
{{- if .Values.rbacEnable }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: Role
metadata:
name: rayservice-editor-role
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# permissions for end users to view rayservices.
{{- if .Values.rbacEnable }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: Role
metadata:
name: rayservice-viewer-role
rules:
Expand Down
14 changes: 13 additions & 1 deletion helm-chart/kuberay-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.rbacEnable }}
kind: ClusterRole
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
Expand Down Expand Up @@ -27,6 +27,18 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
Expand Down
4 changes: 2 additions & 2 deletions helm-chart/kuberay-operator/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.rbacEnable }}
kind: ClusterRoleBinding
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
labels:
Expand All @@ -10,7 +10,7 @@ subjects:
name: {{ .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
kind: Role
name: {{ include "kuberay-operator.fullname" . }}
apiGroup: rbac.authorization.k8s.io
{{- end }}
2 changes: 1 addition & 1 deletion helm-chart/ray-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: ray-cluster
version: 0.3.0
version: 0.3.0-tbt-1
icon: https://github.com/ray-project/ray/raw/master/doc/source/images/ray_header_logo.png
17 changes: 17 additions & 0 deletions helm-chart/ray-cluster/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "ray-cluster.fullname" . }}-svc
spec:
ports:
- name: ray-client
protocol: TCP
port: 10001
targetPort: 10001
- name: dashboard
protocol: TCP
port: 8265
targetPort: 8265
selector:
ray.io/identifier: {{ include "ray-cluster.fullname" . }}-head
type: ClusterIP
15 changes: 13 additions & 2 deletions helm-chart/ray-cluster/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Default values for ray-cluster.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
annotations:
# Treat this as a helm hook to force re-creation until bug is fixed:
# https://github.com/ray-project/kuberay/issues/558
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation

image:
repository: rayproject/ray
Expand All @@ -14,6 +19,7 @@ imagePullSecrets: []
# - name: an-existing-secret

head:
enableInTreeAutoscaling: true
groupName: headgroup
# If enableInTreeAutoscaling is true, the autoscaler sidecar will be added to the Ray head pod.
# Ray autoscaler integration is supported only for Ray versions >= 1.11.0
Expand Down Expand Up @@ -41,7 +47,6 @@ head:
port: '6379'
redis-password: 'LetMeInRay' # Deprecated since Ray 1.11 due to GCS bootstrapping enabled
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
block: 'true'
containerEnv:
Expand All @@ -68,7 +73,13 @@ head:
- mountPath: /tmp/ray
name: log-volume
sidecarContainers: []

ports:
- containerPort: 8265
protocol: TCP
- containerPort: 10001
protocol: TCP
- containerPort: 6379
protocol: TCP

worker:
# If you want to disable the default workergroup
Expand Down
15 changes: 15 additions & 0 deletions scripts/helm-push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -eu -x

version=0.3.0-tbt-"$(git rev-parse --short HEAD)"

helm package \
--version "${version}" \
./helm-chart/kuberay-apiserver \
./helm-chart/kuberay-operator \
./helm-chart/ray-cluster

helm push kuberay-operator-"${version}".tgz oci://ghcr.io/treebeardtech/kuberay/helm-chart
helm push kuberay-apiserver-"${version}".tgz oci://ghcr.io/treebeardtech/kuberay/helm-chart
helm push ray-cluster-"${version}".tgz oci://ghcr.io/treebeardtech/kuberay/helm-chart