port-allocator: reserve 22 port for host nodes
Once public IPs are assigned to only kubernetes process we can open it
back up again.
Change-Id: If538c7cbf99a14ab3853914715d5c0c8722dfbd4
diff --git a/core/port-allocator/main.go b/core/port-allocator/main.go
index 3e143a3..a33f299 100644
--- a/core/port-allocator/main.go
+++ b/core/port-allocator/main.go
@@ -140,7 +140,7 @@
func addPort(pm map[string]any, req allocateReq) error {
sourcePortStr := strconv.Itoa(req.SourcePort)
- if _, ok := pm[sourcePortStr]; ok || req.SourcePort == 80 || req.SourcePort == 443 {
+ if _, ok := pm[sourcePortStr]; ok || req.SourcePort == 80 || req.SourcePort == 443 || req.SourcePort == 22 {
return fmt.Errorf("port %d is already taken", req.SourcePort)
}
pm[sourcePortStr] = fmt.Sprintf("%s:%d", req.TargetService, req.TargetPort)