Fixing comments

This commit is contained in:
Laszlo Janosi 2019-10-18 11:36:00 +02:00
parent 31227d61c2
commit c76995b81b
2 changed files with 4 additions and 6 deletions

View file

@ -40,11 +40,9 @@ func NewParser(r resolver.Resolver) parser.IngressAnnotation {
// Parse parses the annotations contained in the ingress // Parse parses the annotations contained in the ingress
// rule used to indicate if the upstream servers should use SSL // rule used to indicate if the upstream servers should use SSL
func (a su) Parse(ing *networking.Ingress) (interface{}, error) { func (a su) Parse(ing *networking.Ingress) (secure interface{}, err error) {
ca, _ := parser.GetStringAnnotation("secure-verify-ca-secret", ing) if ca, _ := parser.GetStringAnnotation("secure-verify-ca-secret", ing); ca != "" {
if ca != "" {
klog.Errorf("NOTE! secure-verify-ca-secret is not suppored anymore. Please use proxy-ssl-secret instead") klog.Errorf("NOTE! secure-verify-ca-secret is not suppored anymore. Please use proxy-ssl-secret instead")
} }
return nil, nil return
} }

View file

@ -104,7 +104,7 @@ func TestAnnotations(t *testing.T) {
"default/secure-verify-ca": {}, "default/secure-verify-ca": {},
}, },
}).Parse(ing) }).Parse(ing)
if err == nil { if err != nil {
t.Errorf("Unexpected error on ingress: %v", err) t.Errorf("Unexpected error on ingress: %v", err)
} }
} }