knative / knative/eventing

Sugar Reconciler doesn't delete sugared Brokers when resources or config are updated

Open
#6,254 2 comments 0 reactions 0 assignees View on GitHub
area/brokers kind/bug triage/accepted
Dominant language
Go
Stars
1.6k
Forks
631
Avg merge
2d 1h
Merged PRs (30d)
6

Description

**Describe the bug**
The sugar reconciler doesn't delete created Brokers if
- Namespace/Trigger that was responsible for the `default` Broker creation is modified such that it doesn't have the injection label or even deleted
- The `config-sugar.yaml` configmap is updated such that the `namespace-sugar-selector` OR `trigger-sugar-selector` LabelSelectors don't apply to created Brokers.

**Expected behavior**
The Brokers are cleaned up

**To Reproduce**
1. Enable Sugar controller
2. Create a namespace with injection label `eventing.knative.dev/injection: enabled`
3. Wait for a default Broker to be created
4. Modify the namespace and remove the injection label

Also,
5. Same can be be reproduced with using a Trigger for injecting a Broker

**Knative release version**
v1.2

**Additional context**
Add any other context about the problem here such as proposed priority

Contributor guide

Open the contributing guide

Research direction

Start with the Sugar controller and its reconciler, then read config-sugar.yaml and the namespace-sugar-selector and trigger-sugar-selector settings. Reproduce the namespace and Trigger cases described in the issue, and verify that Brokers created by injection are removed when the source resource or selector no longer applies.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.