I use helm to generate a namespaced ray operator and deployed to kubernetes (with ray 1.12.0)
But I always got this:
Not enough permissions to watch for resources: changes (creation/deletion/updates) will not be noticed; the resources are only refreshed on operator restarts.
Not enough permissions to list namespaces. Falling back to a list of namespaces which are assumed to exist: {'ray-test'}
Not enough permissions to watch for namespaces: changes (deletion/creation) will not be noticed; the namespaces are only refreshed on operator restarts.
Any one knows what permission I shall give? Isn’t the permissions in the heml not enough?
# Source: ray/templates/operator_namespaced.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: ray-operator-serviceaccount
namespace: ray-test
---
# Source: ray/templates/operator_namespaced.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ray-operator-role
namespace: ray-test
rules:
- apiGroups: ["", "cluster.ray.io"]
resources: ["rayclusters", "rayclusters/finalizers", "rayclusters/status", "pods", "pods/exec", "services"]
verbs: ["get", "watch", "list", "create", "delete", "patch", "update"]
- apiGroups: [""]
resources: [events]
verbs: [create]
---
# Source: ray/templates/operator_namespaced.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ray-operator-rolebinding
namespace: ray-test
subjects:
- kind: ServiceAccount
name: ray-operator-serviceaccount
namespace: ray-test
roleRef:
kind: Role
name: ray-operator-role
apiGroup: rbac.authorization.k8s.io
---
# Source: ray/templates/operator_namespaced.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ray-operator
namespace: ray-test
spec:
replicas: 1
selector:
matchLabels:
cluster.ray.io/component: operator
template:
metadata:
labels:
cluster.ray.io/component: operator
spec:
serviceAccountName: ray-operator-serviceaccount
containers:
- name: ray
imagePullPolicy: Always
image: rayproject/ray:1.12.0
command: ["ray-operator"]
env:
- name: RAY_OPERATOR_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: AUTOSCALER_MAX_NUM_FAILURES
value: "inf"
resources:
requests:
cpu: 1
memory: 1Gi
ephemeral-storage: 1Gi
limits:
memory: 2Gi
cpu: 1