File tree Expand file tree Collapse file tree 1 file changed +9
-21
lines changed Expand file tree Collapse file tree 1 file changed +9
-21
lines changed Original file line number Diff line number Diff line change @@ -67,30 +67,18 @@ func (i Ingress) supported(k8s store.K8s) (supported bool) {
67
67
}
68
68
}()
69
69
70
+ emptyClass := igClassAnn == "" && i .resource .Class == ""
71
+
70
72
if i .controllerClass == "" {
71
- if igClassAnn == "" && i .resource .Class == "" {
72
- supported = true
73
- return
74
- }
75
- if igClassSpec == CONTROLLER {
76
- supported = true
77
- return
78
- }
73
+ supported = emptyClass || igClassSpec == CONTROLLER
79
74
} else {
80
- if igClassAnn == "" && i .resource .Class == "" && i .allowEmptyClass {
81
- supported = true
82
- return
83
- }
84
- if igClassAnn == i .controllerClass {
85
- supported = true
86
- return
87
- }
88
- if igClassSpec == filepath .Join (CONTROLLER , i .controllerClass ) {
89
- supported = true
90
- return
91
- }
75
+ supported = (emptyClass && i .allowEmptyClass ) ||
76
+ igClassAnn == i .controllerClass ||
77
+ igClassSpec == filepath .Join (CONTROLLER , i .controllerClass )
78
+ }
79
+ if ! supported {
80
+ i .resource .Ignored = true
92
81
}
93
- i .resource .Ignored = true
94
82
return
95
83
}
96
84
You can’t perform that action at this time.
0 commit comments