A Queue's temporal.io/namespace label was trusted as-is -- if the referenced Temporal namespace was never registered (or typo'd), the failure only surfaced as a worker pod silently polling a namespace that doesn't exist. Now reconcileTemporalWorker calls RegisterNamespace (idempotent, ignores AlreadyExists) via a direct WorkflowService gRPC client before creating the TemporalWorker, so namespace and worker always come into existence together. Also grant queue-operator's ClusterRole create/delete on temporalworkers (previously missing, causing forbidden errors on the create-then-delete path).
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: queue-operator
|
|
rules:
|
|
- apiGroups: ["kmsvc.io"]
|
|
resources: ["queues"]
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
- apiGroups: ["kmsvc.io"]
|
|
resources: ["queues/status"]
|
|
verbs: ["get", "update", "patch"]
|
|
- apiGroups: ["kmsvc.io"]
|
|
resources: ["queues/finalizers"]
|
|
verbs: ["update"]
|
|
- apiGroups: ["kmsvc.io"]
|
|
resources: ["temporalworkers"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
- apiGroups: ["kmsvc.io"]
|
|
resources: ["temporalworkers/status"]
|
|
verbs: ["get", "update", "patch"]
|
|
- apiGroups: ["kmsvc.io"]
|
|
resources: ["temporalworkers/finalizers"]
|
|
verbs: ["update"]
|
|
- apiGroups: ["apps"]
|
|
resources: ["deployments"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
- apiGroups: ["coordination.k8s.io"]
|
|
resources: ["leases"]
|
|
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
|
|
- apiGroups: [""]
|
|
resources: ["events"]
|
|
verbs: ["create", "patch"]
|