Skip to content

Commit 096e3bd

Browse files
committed
Deprecates our own statefulset pod label kafka-broker-id
1 parent af7990e commit 096e3bd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ For clusters that enfoce [RBAC](https://kubernetes.io/docs/admin/authorization/r
6868
kubectl apply -f rbac-namespace-default/
6969
```
7070

71+
For example rack awareness can fail without this, `logs -c init-config` showing `Error from server (Forbidden): pods "kafka-0" is forbidden: User "system:serviceaccount:kafka:default" cannot get pods in the namespace "kafka": Unknown user "system:serviceaccount:kafka:default"`.
72+
7173
## Tests
7274

7375
Tests are based on the [kube-test](https://github.com/Yolean/kube-test) concept.

kafka/10broker-config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ data:
2323
sed -i "s/#init#broker.rack=#init#/broker.rack=$ZONE/" /etc/kafka/server.properties
2424
fi
2525
26+
# This requires additional RBAC, and won't be needed after https://github.com/kubernetes/kubernetes/pull/55329
2627
kubectl -n $POD_NAMESPACE label pod $POD_NAME kafka-broker-id=$KAFKA_BROKER_ID
2728
2829
OUTSIDE_HOST=$(kubectl get node "$NODE_NAME" -o jsonpath='{.status.addresses[?(@.type=="InternalIP")].address}')

0 commit comments

Comments
 (0)