Skip to content

Commit 342225e

Browse files
committed
dynamic.go -> func redactList - modified criterias to select objects of Route kind and modified to brake out of loop after both if statments have been evaluated
1 parent 2605a75 commit 342225e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

pkg/datagatherer/k8s/dynamic.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,15 +281,11 @@ func redactList(list []*api.GatheredResource) error {
281281
if gvk.Kind == "Secret" && (gvk.Group == "core" || gvk.Group == "") {
282282
Select(SecretSelectedFields, resource)
283283

284-
// break when the object has been processed as a secret, no
285-
// other kinds have redact modifications
286-
break
287-
288284
// route object
289-
} else if gvk.Kind == "Route" && (gvk.Group == "core" || gvk.Group == "") {
285+
} else if gvk.Kind == "Route" && gvk.Group == "apiextensions.k8s.io" {
290286
Select(RouteSelectedFields, resource)
291287

292-
// break when the object has been processed as a Route, no
288+
// break once a Secret or Route object has been processed as, no
293289
// other kinds have redact modifications
294290
break
295291
}

0 commit comments

Comments
 (0)