From c9f9c841fbdd100e338b1f3f1c95ad20db1ca6a5 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Mon, 18 Nov 2024 11:35:05 +0100 Subject: [PATCH] Make sure to set the namespace in config Or the SA will try to match every ConfigMap on cluster when we only want to scope to the running configmap in namespace --- pkg/adapter/adapter.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/adapter/adapter.go b/pkg/adapter/adapter.go index 46d77d958..00295e901 100644 --- a/pkg/adapter/adapter.go +++ b/pkg/adapter/adapter.go @@ -26,6 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "knative.dev/eventing/pkg/adapter/v2" "knative.dev/pkg/logging" + "knative.dev/pkg/system" ) const globalAdapterPort = "8080" @@ -40,7 +41,11 @@ type envConfig struct { } func NewEnvConfig() adapter.EnvConfigAccessor { - return &envConfig{} + return &envConfig{ + adapter.EnvConfig{ + Namespace: system.Namespace(), + }, + } } type listener struct {