From 180e26c472434ebe5bf2bf6e6a429dbaf4e95465 Mon Sep 17 00:00:00 2001 From: Alistair Hey Date: Thu, 13 Feb 2020 09:07:19 +0000 Subject: [PATCH] Replace tab with spaces in yaml string Signed-off-by: Alistair Hey --- cmd/apps/registry_ingress_app.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmd/apps/registry_ingress_app.go b/cmd/apps/registry_ingress_app.go index 49d08bd7..16ad5ae7 100644 --- a/cmd/apps/registry_ingress_app.go +++ b/cmd/apps/registry_ingress_app.go @@ -18,7 +18,7 @@ type RegInputData struct { CertmanagerEmail string IngressClass string Namespace string - MaxSize string + NginxMaxBuffer string } func MakeInstallRegistryIngress() *cobra.Command { @@ -105,7 +105,11 @@ func buildRegistryYAML(domain, email, ingressClass, namespace, maxSize string) ( CertmanagerEmail: email, IngressClass: ingressClass, Namespace: namespace, - MaxSize: maxSize, + NginxMaxBuffer: "", + } + + if ingressClass == "nginx" { + inputData.NginxMaxBuffer = fmt.Sprintf(" nginx.ingress.kubernetes.io/proxy-body-size: %s", maxSize) } var tpl bytes.Buffer @@ -156,7 +160,7 @@ metadata: annotations: cert-manager.io/cluster-issuer: letsencrypt-prod-registry kubernetes.io/ingress.class: {{.IngressClass}} - nginx.ingress.kubernetes.io/proxy-body-size: {{.MaxSize}} +{{.NginxMaxBuffer}} spec: rules: - host: {{.IngressDomain}}