Skip to content

Commit

Permalink
c/k/app: add non-empty listen address check
Browse files Browse the repository at this point in the history
  • Loading branch information
ibihim committed May 7, 2024
1 parent 9fd7fc0 commit ee50f38
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/kube-rbac-proxy/app/kube-rbac-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,10 @@ func Run(cfg *completedProxyRunOptions) error {
})
}

if len(cfg.secureListenAddress) == 0 && len(cfg.insecureListenAddress) == 0 {
return fmt.Errorf("no listen address provided")
}

if err := gr.Run(); err != nil {
return fmt.Errorf("failed to run groups: %w", err)
}
Expand Down

0 comments on commit ee50f38

Please sign in to comment.