Skip to content

Commit db147f0

Browse files
author
Mengqi Yu
committed
👻 stop allowing port 0
Allowing port 0 doesn't provide much values when doing testing, since user will need to run some command e.g. `netstat` to figure which port is assigned. And it also make defaulting port hard. This change is not a breaking change since ad30658#diff-fbc18bb07cdd05391b7081acc1dfe170R81 has not been released in a stable release yet.
1 parent d6324a4 commit db147f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/webhook/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (s *Server) setDefaults() {
7878
s.WebhookMux = http.NewServeMux()
7979
}
8080

81-
if s.Port < 0 {
81+
if s.Port <= 0 {
8282
s.Port = DefaultPort
8383
}
8484

0 commit comments

Comments
 (0)