@@ -99,13 +99,13 @@ func (n ingressNetworkingV1Beta1Strategy) ConvertIngress() *Ingress {
99
99
continue
100
100
}
101
101
for _ , k8sPath := range k8sRule .HTTP .Paths {
102
- prefix := ""
102
+ var pathType string
103
103
if k8sPath .PathType != nil {
104
- prefix = string (* k8sPath .PathType )
104
+ pathType = string (* k8sPath .PathType )
105
105
}
106
- paths [prefix + "-" + k8sPath .Path ] = & IngressPath {
106
+ paths [pathType + "-" + k8sPath .Path ] = & IngressPath {
107
107
Path : k8sPath .Path ,
108
- PathTypeMatch : string ( * k8sPath . PathType ) ,
108
+ PathTypeMatch : pathType ,
109
109
SvcNamespace : n .ig .GetNamespace (),
110
110
SvcName : k8sPath .Backend .ServiceName ,
111
111
SvcPortInt : int64 (k8sPath .Backend .ServicePort .IntValue ()),
@@ -197,13 +197,13 @@ func (e ingressExtensionsStrategy) ConvertIngress() *Ingress {
197
197
continue
198
198
}
199
199
for _ , k8sPath := range k8sRule .HTTP .Paths {
200
- prefix := ""
200
+ var pathType string
201
201
if k8sPath .PathType != nil {
202
- prefix = string (* k8sPath .PathType )
202
+ pathType = string (* k8sPath .PathType )
203
203
}
204
- paths [prefix + "-" + k8sPath .Path ] = & IngressPath {
204
+ paths [pathType + "-" + k8sPath .Path ] = & IngressPath {
205
205
Path : k8sPath .Path ,
206
- PathTypeMatch : string ( * k8sPath . PathType ) ,
206
+ PathTypeMatch : pathType ,
207
207
SvcNamespace : e .ig .GetNamespace (),
208
208
SvcName : k8sPath .Backend .ServiceName ,
209
209
SvcPortInt : int64 (k8sPath .Backend .ServicePort .IntValue ()),
@@ -283,13 +283,13 @@ func (n ingressNetworkingV1Strategy) ConvertIngress() *Ingress {
283
283
continue
284
284
}
285
285
for _ , k8sPath := range k8sRule .HTTP .Paths {
286
- prefix := ""
286
+ var pathType string
287
287
if k8sPath .PathType != nil {
288
- prefix = string (* k8sPath .PathType )
288
+ pathType = string (* k8sPath .PathType )
289
289
}
290
- paths [prefix + "-" + k8sPath .Path ] = & IngressPath {
290
+ paths [pathType + "-" + k8sPath .Path ] = & IngressPath {
291
291
Path : k8sPath .Path ,
292
- PathTypeMatch : string ( * k8sPath . PathType ) ,
292
+ PathTypeMatch : pathType ,
293
293
SvcNamespace : n .ig .GetNamespace (),
294
294
SvcName : k8sPath .Backend .Service .Name ,
295
295
SvcPortInt : int64 (k8sPath .Backend .Service .Port .Number ),
0 commit comments