Skip to content

Commit

Permalink
Add a note that the calculation for the ServerNamesHashMaxSize seems …
Browse files Browse the repository at this point in the history
…to be wrong

See also kubernetes#564
  • Loading branch information
ankon committed Apr 6, 2017
1 parent 7ca7652 commit a5287f8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/nginx/pkg/cmd/controller/nginx.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) ([]byte, er
var longestName int
var serverNames int
for _, srv := range ingressCfg.Servers {
// XXX: serverNames should actually be based on the _number_ of server names, not the total size.
// See http://nginx.org/en/docs/http/server_names.html
serverNames += len([]byte(srv.Hostname))
if longestName < len(srv.Hostname) {
longestName = len(srv.Hostname)
Expand Down

0 comments on commit a5287f8

Please sign in to comment.