Skip to content

Commit

Permalink
Make sure to set the namespace in config
Browse files Browse the repository at this point in the history
Or the SA will try to match every ConfigMap on cluster when we only want
to scope to the running configmap in namespace
  • Loading branch information
chmouel committed Nov 18, 2024
1 parent de1812c commit c9f9c84
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -40,7 +41,11 @@ type envConfig struct {
}

func NewEnvConfig() adapter.EnvConfigAccessor {
return &envConfig{}
return &envConfig{
adapter.EnvConfig{
Namespace: system.Namespace(),
},
}
}

type listener struct {
Expand Down

0 comments on commit c9f9c84

Please sign in to comment.