Merge pull request #7914 from dokku/k3s-cleanup-ingress-nginx
Fix nginx configuration building in k3s scheduler
This commit is contained in:
2 files changed
+20
-28
No files matched your search
@@ -925,9 +925,27 @@ func getIngressAnnotations(appName string, processType string) (map[string]strin
|
|||||||
annotation: "nginx.ingress.kubernetes.io/proxy-buffering",
|
annotation: "nginx.ingress.kubernetes.io/proxy-buffering",
|
||||||
getter: nginxvhosts.ComputedProxyBuffering,
|
getter: nginxvhosts.ComputedProxyBuffering,
|
||||||
},
|
},
|
||||||
"proxy-buffers": {
|
"proxy-buffers-number": {
|
||||||
annotation: "nginx.ingress.kubernetes.io/proxy-buffers-number",
|
annotation: "nginx.ingress.kubernetes.io/proxy-buffers-number",
|
||||||
getter: nginxvhosts.ComputedProxyBuffers,
|
getter: nginxvhosts.ComputedProxyBuffers,
|
||||||
|
modifier: func(value string) string {
|
||||||
|
parts := strings.Split(value, " ")
|
||||||
|
if len(parts) != 2 {
|
||||||
|
return "8"
|
||||||
|
}
|
||||||
|
return parts[0]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"proxy-buffers-size": {
|
||||||
|
annotation: "nginx.ingress.kubernetes.io/proxy-buffers-size",
|
||||||
|
getter: nginxvhosts.ComputedProxyBuffers,
|
||||||
|
modifier: func(value string) string {
|
||||||
|
parts := strings.Split(value, " ")
|
||||||
|
if len(parts) != 2 {
|
||||||
|
return "4k"
|
||||||
|
}
|
||||||
|
return parts[1]
|
||||||
|
},
|
||||||
},
|
},
|
||||||
"proxy-busy-buffers-size": {
|
"proxy-busy-buffers-size": {
|
||||||
getter: nginxvhosts.ComputedProxyBusyBuffersSize,
|
getter: nginxvhosts.ComputedProxyBusyBuffersSize,
|
||||||
@@ -977,33 +995,6 @@ func getIngressAnnotations(appName string, processType string) (map[string]strin
|
|||||||
return fmt.Sprintf("underscores_in_headers %s;", value)
|
return fmt.Sprintf("underscores_in_headers %s;", value)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"x-forwarded-for-value": {
|
|
||||||
getter: nginxvhosts.ComputedXForwardedForValue,
|
|
||||||
locationSnippet: func(value string) string {
|
|
||||||
if value == "" {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("proxy_set_header X-Forwarded-For %s;", value)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"x-forwarded-port-value": {
|
|
||||||
getter: nginxvhosts.ComputedXForwardedPortValue,
|
|
||||||
locationSnippet: func(value string) string {
|
|
||||||
if value == "" {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("proxy_set_header X-Forwarded-Port %s;", value)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"x-forwarded-proto-value": {
|
|
||||||
getter: nginxvhosts.ComputedXForwardedProtoValue,
|
|
||||||
locationSnippet: func(value string) string {
|
|
||||||
if value == "" {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
return fmt.Sprintf("proxy_set_header X-Forwarded-Proto %s;", value)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"x-forwarded-ssl": {
|
"x-forwarded-ssl": {
|
||||||
getter: nginxvhosts.ComputedXForwardedSSL,
|
getter: nginxvhosts.ComputedXForwardedSSL,
|
||||||
locationSnippet: func(value string) string {
|
locationSnippet: func(value string) string {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ controller:
|
|||||||
enabled: true
|
enabled: true
|
||||||
config:
|
config:
|
||||||
access-log-path: /var/log/nginx/access.log
|
access-log-path: /var/log/nginx/access.log
|
||||||
|
annotations-risk-level: Critical
|
||||||
error-log-path: /var/log/nginx/error.log
|
error-log-path: /var/log/nginx/error.log
|
||||||
log-format-escape-json: "true"
|
log-format-escape-json: "true"
|
||||||
extraVolumeMounts:
|
extraVolumeMounts:
|
||||||
|
|||||||
Reference in new issue
Block a user