Skip to content

Commit

Permalink
Replace tab with spaces in yaml string
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
  • Loading branch information
Waterdrips authored and alexellis committed Feb 13, 2020
1 parent 72de7fa commit 180e26c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/apps/registry_ingress_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type RegInputData struct {
CertmanagerEmail string
IngressClass string
Namespace string
MaxSize string
NginxMaxBuffer string
}

func MakeInstallRegistryIngress() *cobra.Command {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}}
Expand Down

0 comments on commit 180e26c

Please sign in to comment.