fix: queue-operator dropped reconcile namespace and overflowed hash-range status

main.go called Reconcile(ctx, req.Name) without req.Namespace, so the
Get against the namespaced Queue CRD always 404'd and was silently
swallowed as success -- no shard topics or Redis state were ever created.

Separately, ShardStatus.HashRangeStart/End were uint32, but controller-gen
maps that to OpenAPI format:int32, whose max (2147483647) is smaller than
FullHashRangeEnd (0xFFFFFFFF), so the apiserver rejected every status
update with the (misleadingly empty-looking) "must be of type integer with
format int32" error. Widened to int64, regenerated the CRD, and synced the
chart's bundled copy.
This commit is contained in:
riotpiaole
2026-06-22 12:23:23 -07:00
parent 173a4935ab
commit 9fa5420b22
7 changed files with 40 additions and 31 deletions
+3 -3
View File
@@ -68,13 +68,13 @@ func (r *QueueReconciler) reconcileSplits(ctx context.Context, queue *kmsvcv1.Qu
continue
}
mid := kafka.SplitHashRange(s.HashRangeStart, s.HashRangeEnd)
mid := kafka.SplitHashRange(uint32(s.HashRangeStart), uint32(s.HashRangeEnd))
childAID := nextShardID(queue.Status.Shards)
childA := r.newShard(childAID, s.ID, s.HashRangeStart, mid, queue)
childA := r.newShard(childAID, s.ID, uint32(s.HashRangeStart), mid, queue)
childA.CreatedAt = metav1.NewTime(now)
childAIDNum, _ := strconv.Atoi(childAID)
childBID := strconv.Itoa(childAIDNum + 1)
childB := r.newShard(childBID, s.ID, mid, s.HashRangeEnd, queue)
childB := r.newShard(childBID, s.ID, mid, uint32(s.HashRangeEnd), queue)
childB.CreatedAt = metav1.NewTime(now)
s.Phase = kmsvcv1.ShardPhaseClosing