# Kubernetes RBAC for the loosely coupled execution target. # # Granted to the service account running the Dagster RUN pods - the pod that # calls PipesK8sClient.run() is the one that creates and watches the payload Job. # # Note what is NOT here: the payload itself needs no RBAC, no database # credentials and no Vault role. Its only channel back to the control plane is # the pod log stream, which the dispatching pod reads. # # If the payload runs in a different namespace from the dispatcher, apply this # Role in the PAYLOAD namespace and keep the RoleBinding subject pointing at the # dispatcher's service account. apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: distributed-execution-pipes-dispatcher namespace: dagster rules: - apiGroups: ["batch"] resources: ["jobs", "jobs/status"] verbs: ["create", "get", "list", "watch", "delete"] # pods/log is the message channel for PipesK8sPodLogsMessageReader. # Without it the payload runs but reports nothing. - apiGroups: [""] resources: ["pods", "pods/log", "pods/status"] verbs: ["get", "list", "watch"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: distributed-execution-pipes-dispatcher namespace: dagster subjects: - kind: ServiceAccount name: dagster-dev namespace: dagster roleRef: kind: Role name: distributed-execution-pipes-dispatcher apiGroup: rbac.authorization.k8s.io