Skip to content

Commit

Permalink
Disable controller default health probes in the IMC dispatcher
Browse files Browse the repository at this point in the history
The IMC dispatcher is using the same server receiving events
for k8s readiness and liveness probes, so we don't need the
controller internal health server to be running.

The controller internal health server is using the same port
which leads to this error:

```
2024-07-31T15:58:53.582Z	error	inmemorychannel-dispatcher	sharedmain/main.go:334	Error while running server	{"commit": "b7bfc92", "knative.dev/pod": "imc-dispatcher-696d94588d-j7fr5", "error": "listen tcp :8080: bind: address already in use"}
knative.dev/pkg/injection/sharedmain.MainWithConfig
	knative.dev/[email protected]/injection/sharedmain/main.go:334
knative.dev/pkg/injection/sharedmain.MainWithContext
	knative.dev/[email protected]/injection/sharedmain/main.go:209
main.main
	knative.dev/eventing/cmd/in_memory/channel_dispatcher/main.go:47
runtime.main
	runtime/proc.go:271
```

Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi committed Aug 1, 2024
1 parent a9abf3c commit 4071782
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/in_memory/channel_dispatcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func main() {
eventingtls.TrustBundleLabelSelector,
)

ctx = sharedmain.WithHealthProbesDisabled(ctx)

sharedmain.MainWithContext(ctx, "inmemorychannel-dispatcher",
inmemorychannel.NewController,
)
Expand Down

0 comments on commit 4071782

Please sign in to comment.