-
|
I followed the Strimzi blog post “Phased upgrades of Strimzi managed Kafka fleets”: Everything works great using the example cluster configuration from the guide: However, when I add a NodePort listener to the Kafka cluster, the Strimzi Operator fails with an exception while creating the ClusterRoleBinding. ...
listeners:
- configuration:
bootstrap:
nodePort: 31012
name: external
port: 9094
tls: false
type: nodeport
...The operator log shows that it was looking for a strimzi-kafka-broker ClusterRole: In my setup, I’ve renamed the ClusterRoles with a version suffix to support multiple Strimzi operators in the same Kubernetes cluster: ❯ kubectl get clusterrole | grep strimzi
strimzi-cluster-operator-global-0-39-0
strimzi-cluster-operator-leader-election-0-39-0
strimzi-cluster-operator-namespaced-0-39-0
strimzi-cluster-operator-watched-0-39-0
strimzi-entity-operator-0-39-0
strimzi-kafka-broker-0-39-0
strimzi-kafka-client-0-39-0It seems the operator still hardcodes the role name strimzi-kafka-broker when trying to create the ClusterRoleBinding. ❓ Question: I also tried manually creating the ClusterRoleBinding, but the operator still failed to proceed: apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: strimzi-kafka-kafka-a-kafka-init
subjects:
- kind: ServiceAccount
name: kafka-a-kafka
namespace: kafka
roleRef:
kind: ClusterRole
name: strimzi-kafka-broker-0-39-0
apiGroup: rbac.authorization.k8s.ioAny suggestions on how to handle this when running multiple Strimzi operators in the same cluster? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
No, the ClusterRoles used for delegation cannot be renamed (those are the ones with delegation in the name: https://github.com/strimzi/strimzi-kafka-operator/tree/main/install/cluster-operator). You have to use their original names. Their content changes relatively rarely, but when it changes, you should make sure you include all the rights required by any version you use. In general, I would probably recommend the same approach for all the ClusterRoles and renaming only the ClusterRoleBindings. But it is strictly needed only for the 3 delegation ones. |
Beta Was this translation helpful? Give feedback.
No, the ClusterRoles used for delegation cannot be renamed (those are the ones with delegation in the name: https://github.com/strimzi/strimzi-kafka-operator/tree/main/install/cluster-operator). You have to use their original names. Their content changes relatively rarely, but when it changes, you should make sure you include all the rights required by any version you use. In general, I would probably recommend the same approach for all the ClusterRoles and renaming only the ClusterRoleBindings. But it is strictly needed only for the 3 delegation ones.