Skip to content

Commit 29299f2

Browse files
committed
rule
Signed-off-by: Paramoshka <[email protected]>
1 parent 126df97 commit 29299f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/linters/templates/rules/ingress.go

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package rules
1818

1919
import (
20+
"fmt"
2021
"strings"
2122

2223
v1 "k8s.io/api/networking/v1"
@@ -57,6 +58,11 @@ func (r *IngressRule) CheckSnippetsRule(object storage.StoreObject, errorList *e
5758
return
5859
}
5960

61+
if !r.Enabled(object.Unstructured.GetKind(), object.Unstructured.GetName()) {
62+
fmt.Printf("⚠️ Skip Ingress %q due to exclusion rule.\n", object.Unstructured.GetName())
63+
return
64+
}
65+
6066
converter := runtime.DefaultUnstructuredConverter
6167
ingress := new(v1.Ingress)
6268
if err := converter.FromUnstructured(object.Unstructured.UnstructuredContent(), ingress); err != nil {

0 commit comments

Comments
 (0)