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
671
671
protocol := fields [1 ]
672
672
pools := strings .Split (fields [2 ], "," )
673
673
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
+ }
677
695
}
678
696
ports = append (ports , networkingv1alpha1.PortEntry {
679
697
Port : port ,
680
698
Protocol : protocol ,
681
699
Pools : pools ,
682
700
UseSamePortAcrossPools : useSamePortAcrossPools ,
701
+ CertSecretName : certSecretName ,
683
702
})
684
703
}
685
704
return
You can’t perform that action at this time.
0 commit comments