File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -671,15 +671,34 @@ func generatePortsFromAnnotation(anno string) (ports []networkingv1alpha1.PortEn
671671 protocol := fields [1 ]
672672 pools := strings .Split (fields [2 ], "," )
673673 var useSamePortAcrossPools * bool
674- if len (fields ) >= 4 && fields [3 ] == "useSamePortAcrossPools" {
675- b := true
676- useSamePortAcrossPools = & b
674+ var certSecretName * string
675+ if len (fields ) >= 4 {
676+ options := fields [3 ]
677+ optionList := strings .Split (options , "," )
678+ for _ , option := range optionList {
679+ kv := strings .Split (option , "=" )
680+ if len (kv ) == 1 {
681+ switch kv [0 ] {
682+ case "useSamePortAcrossPools" :
683+ b := true
684+ useSamePortAcrossPools = & b
685+ }
686+ } else if len (kv ) == 2 {
687+ key := kv [0 ]
688+ value := kv [1 ]
689+ switch key {
690+ case "certSecret" :
691+ certSecretName = & value
692+ }
693+ }
694+ }
677695 }
678696 ports = append (ports , networkingv1alpha1.PortEntry {
679697 Port : port ,
680698 Protocol : protocol ,
681699 Pools : pools ,
682700 UseSamePortAcrossPools : useSamePortAcrossPools ,
701+ CertSecretName : certSecretName ,
683702 })
684703 }
685704 return
You can’t perform that action at this time.
0 commit comments