Skip to content

Commit

Permalink
fix broken in-mem ns mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelvillard committed Feb 22, 2021
1 parent 4e5bdf9 commit bd2e963
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ rules:
- inmemorychannels/finalizers
verbs:
- update
- apiGroups:
- messaging.knative.dev
resources:
- inmemorychannels/finalizers
- inmemorychannels/status
- inmemorychannels
verbs:
- patch
- apiGroups:
- ""
resources:
Expand Down
10 changes: 10 additions & 0 deletions pkg/reconciler/inmemorychannel/controller/resources/dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ func makeEnv(dispatcherConfig config.EventDispatcherConfig) []corev1.EnvVar {
FieldPath: "metadata.namespace",
},
},
}, {
Name: "POD_NAME",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "metadata.name",
},
},
}, {
Name: "CONTAINER_NAME",
Value: "dispatcher",
}, {
Name: "MAX_IDLE_CONNS",
Value: strconv.Itoa(dispatcherConfig.MaxIdleConns),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,16 @@ func TestNewDispatcher(t *testing.T) {
FieldPath: "metadata.namespace",
},
},
}, {
Name: "POD_NAME",
ValueFrom: &corev1.EnvVarSource{
FieldRef: &corev1.ObjectFieldSelector{
FieldPath: "metadata.name",
},
},
}, {
Name: "CONTAINER_NAME",
Value: "dispatcher",
}, {
Name: "MAX_IDLE_CONNS",
Value: "2000",
Expand Down

0 comments on commit bd2e963

Please sign in to comment.