Skip to content

Commit

Permalink
Truncate comment to fit under the line limit for nginx config (#255)
Browse files Browse the repository at this point in the history
* Truncate comment to fit under the line limit for nginx config

* Remove extraneous conditionals

* Remove ingress comment entirely

* Revert the ingress comment

* Indicate truncated lines
barisi authored Jul 25, 2023
1 parent 4301370 commit e9172db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nginx/nginx.tmpl
Original file line number Diff line number Diff line change
@@ -160,7 +160,10 @@ http {
{{ end }}

{{- range $entry := .Servers }}
# ingress: {{ $entry.Name }}
{{ $strLen := len $entry.Name }} {{ if gt $strLen 4000 }}
# The following comment is truncated to 4000 characters due to nginx config line limits
{{ end }}
# ingress: {{ printf "%.4000s" $entry.Name }}
{{- range $portConf := $IngressPorts }}
server {
listen {{ $portConf.Port }}{{- if eq $portConf.Name "https" }} ssl{{ end }}{{ if $proxyprotocol }} proxy_protocol{{ end }};

0 comments on commit e9172db

Please sign in to comment.