Basic TLS support.

This commit is contained in:
Prashanth Balasubramanian
2016-01-16 16:06:40 -08:00
parent 87fbfdc953
commit c56bebf594
17 changed files with 8683 additions and 7494 deletions

View File

@@ -1084,6 +1084,9 @@ func (i *IngressDescriber) describeIngress(ing *extensions.Ingress) (string, err
ns = api.NamespaceSystem
}
fmt.Fprintf(out, "Default backend:\t%s (%s)\n", backendStringer(def), i.describeBackend(ns, def))
if len(ing.Spec.TLS) != 0 {
describeIngressTLS(out, ing.Spec.TLS)
}
fmt.Fprint(out, "Rules:\n Host\tPath\tBackends\n")
fmt.Fprint(out, " ----\t----\t--------\n")
for _, rules := range ing.Spec.Rules {
@@ -1105,6 +1108,14 @@ func (i *IngressDescriber) describeIngress(ing *extensions.Ingress) (string, err
})
}
func describeIngressTLS(out io.Writer, ingTLS []extensions.IngressTLS) {
fmt.Fprintf(out, "TLS:\n")
for _, t := range ingTLS {
fmt.Fprintf(out, " %v terminates %v\n", t.SecretName, strings.Join(t.Hosts, ","))
}
return
}
// TODO: Move from annotations into Ingress status.
func describeIngressAnnotations(out io.Writer, annotations map[string]string) {
fmt.Fprintf(out, "Annotations:\n")