IngressTLS: allow secretName to be blank for SNI routing

This commit is contained in:
Tommy Murphy
2016-03-28 20:19:35 -04:00
parent e01feae75a
commit 4d22c2fd6a
9 changed files with 18 additions and 31 deletions

View File

@@ -523,13 +523,6 @@ func ValidateIngressName(name string, prefix bool) (bool, string) {
func validateIngressTLS(spec *extensions.IngressSpec, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
// Currently the Ingress only supports HTTP(S), so a secretName is required.
// This will not be the case if we support SSL routing at L4 via SNI.
for i, t := range spec.TLS {
if t.SecretName == "" {
allErrs = append(allErrs, field.Required(fldPath.Index(i).Child("secretName"), spec.TLS[i].SecretName))
}
}
// TODO: Perform a more thorough validation of spec.TLS.Hosts that takes
// the wildcard spec from RFC 6125 into account.
return allErrs