Skip to content

Commit

Permalink
Use v2 specific label to avoid matching previous deployment-based dis…
Browse files Browse the repository at this point in the history
…patchers

This ensures that our `consumergroup` controller as well as replication
controller only match v2-specific pods and won't try to reconcile
pods that belong to the previous deployment.

Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
  • Loading branch information
pierDipi committed Sep 18, 2024
1 parent 8b4b0dd commit 9af5bf2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion control-plane/pkg/reconciler/consumergroup/consumergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,10 @@ func (r *Reconciler) reconcileSecret(ctx context.Context, expectedSecret *corev1
}

func (r *Reconciler) ensureContractConfigmapsExist(ctx context.Context, scheduler Scheduler) error {
selector := labels.SelectorFromSet(map[string]string{"app": scheduler.StatefulSetName})
selector := labels.SelectorFromSet(map[string]string{
"app": scheduler.StatefulSetName,
"app.kubernetes.io/kind": "kafka-dispatcher",
})
pods, err := r.PodLister.
Pods(r.SystemNamespace).
List(selector)
Expand Down
1 change: 1 addition & 0 deletions data-plane/config/broker/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
selector:
matchLabels:
app: kafka-broker-dispatcher
app.kubernetes.io/kind: kafka-dispatcher
template:
metadata:
name: kafka-broker-dispatcher
Expand Down
1 change: 1 addition & 0 deletions data-plane/config/channel/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
selector:
matchLabels:
app: kafka-channel-dispatcher
app.kubernetes.io/kind: kafka-dispatcher
template:
metadata:
name: kafka-channel-dispatcher
Expand Down
1 change: 1 addition & 0 deletions data-plane/config/source/500-dispatcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
selector:
matchLabels:
app: kafka-source-dispatcher
app.kubernetes.io/kind: kafka-dispatcher
template:
metadata:
name: kafka-source-dispatcher
Expand Down

0 comments on commit 9af5bf2

Please sign in to comment.