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) {
6767 }
6868 }()
6969
70+ emptyClass := igClassAnn == "" && i .resource .Class == ""
71+
7072 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
7974 } 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
9281 }
93- i .resource .Ignored = true
9482 return
9583}
9684
You can’t perform that action at this time.
0 commit comments