mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Basic TLS support.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user