feat: stamp Queue shard status with availability zones
Resolves each shard topic's replica broker IDs (internal/kafka.Admin. ReplicaBrokerIDs) to the topology.kubernetes.io/zone labels of the nodes hosting those brokers (ZoneLocator), and writes the result into ShardStatus.AvailabilityZones each reconcile. Uses mgr.GetAPIReader() rather than the cached client for the Pod/Node lookups, since the cached client would otherwise require cluster-wide list/watch RBAC on Pods just to serve occasional point Gets.
This commit is contained in:
@@ -121,6 +121,13 @@ type ShardStatus struct {
|
||||
// CreatedAt timestamps when this shard was created, used to enforce
|
||||
// ShardSplitCooldownSeconds.
|
||||
CreatedAt metav1.Time `json:"createdAt,omitempty"`
|
||||
|
||||
// AvailabilityZones lists the topology.kubernetes.io/zone values of every
|
||||
// node currently hosting a Kafka replica of this shard's topic, resolved
|
||||
// from the broker pods' node placement each reconcile. Empty until the
|
||||
// first successful resolution (e.g. node lookup failed transiently).
|
||||
// +optional
|
||||
AvailabilityZones []string `json:"availabilityZones,omitempty"`
|
||||
}
|
||||
|
||||
// QueueStatus defines the observed state of a Queue.
|
||||
|
||||
Reference in New Issue
Block a user