This is an automated email from the ASF dual-hosted git repository.

zhangjintao pushed a commit to branch v1.6.0
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/v1.6.0 by this push:
     new b76074f9 chore: extra annotations logs (#1549) (#1554)
b76074f9 is described below

commit b76074f92fae038dcdcd8db25a866a29405ef943
Author: Jintao Zhang <[email protected]>
AuthorDate: Mon Dec 26 18:13:25 2022 +0800

    chore: extra annotations logs (#1549) (#1554)
    
    Co-authored-by: rongxin <[email protected]>
---
 .../ingress/translation/annotations/upstreamscheme/upstreamscheme.go   | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/pkg/providers/ingress/translation/annotations/upstreamscheme/upstreamscheme.go
 
b/pkg/providers/ingress/translation/annotations/upstreamscheme/upstreamscheme.go
index 2e183c4f..f9ce46b6 100644
--- 
a/pkg/providers/ingress/translation/annotations/upstreamscheme/upstreamscheme.go
+++ 
b/pkg/providers/ingress/translation/annotations/upstreamscheme/upstreamscheme.go
@@ -30,6 +30,9 @@ func NewParser() annotations.IngressAnnotationsParser {
 
 func (w *upstreamscheme) Parse(e annotations.Extractor) (interface{}, error) {
        scheme := 
strings.ToLower(e.GetStringAnnotation(annotations.AnnotationsUpstreamScheme))
+       if scheme == "" {
+               return nil, nil
+       }
        _, ok := apisixv1.ValidSchemes[scheme]
        if ok {
                return scheme, nil

Reply via email to