Cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "my-project" when upgrading AMQ 7.9 to AMQ 7.10 via CLI
Issue
- Upgrading the AMQ broker version from 7.9 to 7.10, after executing the
oc apply -f deployment.yaml
command, the operator log shows:
Executing entrypoint
exec /home/amq-broker-operator/bin/amq-broker-operator
2022-08-26T15:11:47.606Z INFO setup Go Version: go1.16.12
2022-08-26T15:11:47.606Z INFO setup Go OS/Arch: linux/amd64
2022-08-26T15:11:47.606Z INFO setup Version of operator-sdk: 1.15.0
2022-08-26T15:11:47.606Z INFO setup Version of the operator: 7.10.0
2022-08-26T15:11:47.606Z INFO setup Product Version: 7.10.0
2022-08-26T15:11:47.606Z INFO setup Supported AMQ Broker Product Versions: 7.10.0 7.8.1 7.8.2 7.8.3 7.9.0 7.9.1 7.9.2 7.9.3
2022-08-26T15:11:47.606Z INFO setup Got operator namespace {"operator ns": "my-project"}
2022-08-26T15:11:47.606Z INFO setup Watching namespace {"namespace": "my-project"}
I0826 15:11:49.673156 1 request.go:665] Waited for 1.044208193s due to client-side throttling, not priority and fairness, request: GET:https://<IP_ADDRESS>:443/apis/packages.operators.coreos.com/v1?timeout=32s
2022-08-26T15:11:52.077Z INFO controller-runtime.metrics metrics server is starting to listen {"addr": "0.0.0.0:8383"}
2022-08-26T15:11:59.106Z INFO setup service account name: amq-broker-operator
2022-08-26T15:11:59.107Z INFO setup NOT Setting up webhook functions {"ENABLE_WEBHOOKS": "false"}
2022-08-26T15:11:59.107Z INFO setup starting the Cmd.
2022-08-26T15:11:59.107Z INFO controller_v1beta1activemqartemisaddress Setting up address observer
2022-08-26T15:11:59.108Z INFO addressobserver_activemqartemisaddress #### Started workers
I0826 15:11:59.109097 1 leaderelection.go:248] attempting to acquire leader lease my-project/d864aab0.amq.io...
2022-08-26T15:11:59.109Z INFO starting metrics server {"path": "/metrics"}
E0826 15:11:59.116852 1 leaderelection.go:330] error retrieving resource lock my-project/d864aab0.amq.io: leases.coordination.k8s.io "d864aab0.amq.io" is forbidden: User "system:serviceaccount:my-project:amq-broker-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "my-project"
E0826 15:12:02.697992 1 leaderelection.go:330] error retrieving resource lock my-project/d864aab0.amq.io: leases.coordination.k8s.io "d864aab0.amq.io" is forbidden: User "system:serviceaccount:my-project:amq-broker-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "my-project"
E0826 15:12:05.988379 1 leaderelection.go:330] error retrieving resource lock my-project/d864aab0.amq.io: leases.coordination.k8s.io "d864aab0.amq.io" is forbidden: User "system:serviceaccount:my-project:amq-broker-operator" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "my-project"
Environment
- AMQ 7.9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.