Skip to content

controller: Place events in the operator namespace - #210

Open
alicefr wants to merge 1 commit into
bootc-dev:mainfrom
alicefr:fix-events
Open

alicefr wants to merge 1 commit into
bootc-dev:mainfrom
alicefr:fix-events

Conversation

@alicefr

@alicefr alicefr commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Cluster-scoped CRDs (BootcNodePool, BootcNode) have no namespace, so client-go's EventRecorder defaults to creating events in "default". Deep-copy the regarding/related objects and inject the operator's own namespace before recording, so events appear alongside the operator.

The namespace is read from POD_NAMESPACE (set via downward API) with a fallback to the in-cluster service-account namespace file.

Fixes: #209

Cluster-scoped CRDs (BootcNodePool, BootcNode) have no namespace, so
client-go's EventRecorder defaults to creating events in "default".
Deep-copy the regarding/related objects and inject the operator's own
namespace before recording, so events appear alongside the operator.

The namespace is read from POD_NAMESPACE (set via downward API) with a
fallback to the in-cluster service-account namespace file.

Fixes: bootc-dev#209
Assisted-by: AI
Signed-off-by: Alice Frosi <afrosi@redhat.com>
@alicefr

alicefr commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator Author

@Mergifyio backport relase-0.1

@mergify

mergify Bot commented Oct 2, 2026

Copy link
Copy Markdown

backport relase-0.1

🟠 Waiting for conditions to match

Details
  • merged [📌 backport requirement]

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Bootc-operator events are in the default namespace

1 participant