@@ -110,7 +110,6 @@ func (n ingressNetworkingV1Beta1Strategy) ConvertIngress() *Ingress {
110110 SvcName : k8sPath .Backend .ServiceName ,
111111 SvcPortInt : int64 (k8sPath .Backend .ServicePort .IntValue ()),
112112 SvcPortString : k8sPath .Backend .ServicePort .StrVal ,
113- Status : "" ,
114113 }
115114 }
116115 if rule , ok := rules [k8sRule .Host ]; ok {
@@ -119,9 +118,8 @@ func (n ingressNetworkingV1Beta1Strategy) ConvertIngress() *Ingress {
119118 }
120119 } else {
121120 rules [k8sRule .Host ] = & IngressRule {
122- Host : k8sRule .Host ,
123- Paths : paths ,
124- Status : "" ,
121+ Host : k8sRule .Host ,
122+ Paths : paths ,
125123 }
126124 }
127125 }
@@ -137,7 +135,6 @@ func (n ingressNetworkingV1Beta1Strategy) ConvertIngress() *Ingress {
137135 SvcPortInt : int64 (ingressBackend .ServicePort .IntValue ()),
138136 SvcPortString : ingressBackend .ServicePort .StrVal ,
139137 IsDefaultBackend : true ,
140- Status : "" ,
141138 }
142139 }(n .ig .Spec .Backend ),
143140 TLS : func (ingressTLS []networkingv1beta1.IngressTLS ) map [string ]* IngressTLS {
@@ -147,18 +144,11 @@ func (n ingressNetworkingV1Beta1Strategy) ConvertIngress() *Ingress {
147144 tls [host ] = & IngressTLS {
148145 Host : host ,
149146 SecretName : k8sTLS .SecretName ,
150- Status : EMPTY ,
151147 }
152148 }
153149 }
154150 return tls
155151 }(n .ig .Spec .TLS ),
156- Status : func () Status {
157- if n .ig .ObjectMeta .GetDeletionTimestamp () != nil {
158- return DELETED
159- }
160- return ADDED
161- }(),
162152 }
163153}
164154
@@ -167,12 +157,6 @@ func (n ingressNetworkingV1Beta1Strategy) ConvertClass() *IngressClass {
167157 APIVersion : NETWORKINGV1BETA1 ,
168158 Name : n .class .GetName (),
169159 Controller : n .class .Spec .Controller ,
170- Status : func () Status {
171- if n .class .ObjectMeta .GetDeletionTimestamp () != nil {
172- return DELETED
173- }
174- return ADDED
175- }(),
176160 }
177161}
178162
@@ -208,7 +192,6 @@ func (e ingressExtensionsStrategy) ConvertIngress() *Ingress {
208192 SvcName : k8sPath .Backend .ServiceName ,
209193 SvcPortInt : int64 (k8sPath .Backend .ServicePort .IntValue ()),
210194 SvcPortString : k8sPath .Backend .ServicePort .StrVal ,
211- Status : "" ,
212195 }
213196 }
214197 if rule , ok := rules [k8sRule .Host ]; ok {
@@ -217,9 +200,8 @@ func (e ingressExtensionsStrategy) ConvertIngress() *Ingress {
217200 }
218201 } else {
219202 rules [k8sRule .Host ] = & IngressRule {
220- Host : k8sRule .Host ,
221- Paths : paths ,
222- Status : "" ,
203+ Host : k8sRule .Host ,
204+ Paths : paths ,
223205 }
224206 }
225207 }
@@ -235,7 +217,6 @@ func (e ingressExtensionsStrategy) ConvertIngress() *Ingress {
235217 SvcPortInt : int64 (ingressBackend .ServicePort .IntValue ()),
236218 SvcPortString : ingressBackend .ServicePort .StrVal ,
237219 IsDefaultBackend : true ,
238- Status : "" ,
239220 }
240221 }(e .ig .Spec .Backend ),
241222 TLS : func (ingressTLS []extensionsv1beta1.IngressTLS ) map [string ]* IngressTLS {
@@ -245,18 +226,11 @@ func (e ingressExtensionsStrategy) ConvertIngress() *Ingress {
245226 tls [host ] = & IngressTLS {
246227 Host : host ,
247228 SecretName : k8sTLS .SecretName ,
248- Status : EMPTY ,
249229 }
250230 }
251231 }
252232 return tls
253233 }(e .ig .Spec .TLS ),
254- Status : func () Status {
255- if e .ig .ObjectMeta .GetDeletionTimestamp () != nil {
256- return DELETED
257- }
258- return ADDED
259- }(),
260234 }
261235}
262236
@@ -292,7 +266,6 @@ func (n ingressNetworkingV1Strategy) ConvertIngress() *Ingress {
292266 Path : k8sPath .Path ,
293267 PathTypeMatch : pathType ,
294268 SvcNamespace : n .ig .GetNamespace (),
295- Status : "" ,
296269 }
297270 if k8sPath .Backend .Service != nil {
298271 paths [pathKey ].SvcName = k8sPath .Backend .Service .Name
@@ -306,9 +279,8 @@ func (n ingressNetworkingV1Strategy) ConvertIngress() *Ingress {
306279 }
307280 } else {
308281 rules [k8sRule .Host ] = & IngressRule {
309- Host : k8sRule .Host ,
310- Paths : paths ,
311- Status : "" ,
282+ Host : k8sRule .Host ,
283+ Paths : paths ,
312284 }
313285 }
314286 }
@@ -321,7 +293,6 @@ func (n ingressNetworkingV1Strategy) ConvertIngress() *Ingress {
321293 ingPath := & IngressPath {
322294 SvcNamespace : n .ig .GetNamespace (),
323295 IsDefaultBackend : true ,
324- Status : "" ,
325296 }
326297 if ingressBackend .Service != nil {
327298 ingPath .SvcName = ingressBackend .Service .Name
@@ -337,18 +308,11 @@ func (n ingressNetworkingV1Strategy) ConvertIngress() *Ingress {
337308 tls [host ] = & IngressTLS {
338309 Host : host ,
339310 SecretName : k8sTLS .SecretName ,
340- Status : EMPTY ,
341311 }
342312 }
343313 }
344314 return tls
345315 }(n .ig .Spec .TLS ),
346- Status : func () Status {
347- if n .ig .ObjectMeta .GetDeletionTimestamp () != nil {
348- return DELETED
349- }
350- return ADDED
351- }(),
352316 }
353317}
354318
@@ -357,12 +321,6 @@ func (n ingressNetworkingV1Strategy) ConvertClass() *IngressClass {
357321 APIVersion : NETWORKINGV1 ,
358322 Name : n .class .GetName (),
359323 Controller : n .class .Spec .Controller ,
360- Status : func () Status {
361- if n .class .ObjectMeta .GetDeletionTimestamp () != nil {
362- return DELETED
363- }
364- return ADDED
365- }(),
366324 }
367325}
368326
0 commit comments