mirror of
https://github.com/containous/traefik.git
synced 2025-10-29 16:23:53 +03:00
Skip TLS section with no secret in Kubernetes ingress
This commit is contained in:
committed by
Traefiker Bot
parent
52ec0e8d34
commit
e598d6bcca
@@ -2824,6 +2824,16 @@ func TestGetTLS(t *testing.T) {
|
||||
),
|
||||
)
|
||||
|
||||
testIngressWithoutSecret := buildIngress(
|
||||
iNamespace("testing"),
|
||||
iRules(
|
||||
iRule(iHost("ep1.example.com")),
|
||||
),
|
||||
iTLSes(
|
||||
iTLS("", "foo.com"),
|
||||
),
|
||||
)
|
||||
|
||||
testCases := []struct {
|
||||
desc string
|
||||
ingress *extensionsv1beta1.Ingress
|
||||
@@ -2950,6 +2960,12 @@ func TestGetTLS(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
desc: "return nil when no secret is defined",
|
||||
ingress: testIngressWithoutSecret,
|
||||
client: clientMock{},
|
||||
result: map[string]*tls.Configuration{},
|
||||
},
|
||||
{
|
||||
desc: "pass the endpoints defined in the annotation to the certificate",
|
||||
ingress: buildIngress(
|
||||
|
||||
Reference in New Issue
Block a user