Queue lives in the sqs namespace while its TemporalWorker is created in the Temporal namespace (KMSVC_TEMPORAL_NAMESPACE), so SetControllerReference always failed with "cross-namespace owner references are disallowed". Drop the owner ref (lifecycle already handled explicitly in reconcileDelete) and move Spec population into the CreateOrUpdate mutate closure so updates to an existing TemporalWorker actually stick. Also commit the generated TemporalWorker CRD and RBAC rules (temporalworkers, deployments) that were previously untracked.
33 lines
1.0 KiB
YAML
33 lines
1.0 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", "update", "patch"]
|
|
- 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"]
|