boundless-engineer-23836
11/01/2022, 3:55 PMconst k8Services = args.resources.filter(r => r.isType(k8s.core.v1.Service));
if (k8Services.length !== 3) {
reportViolation(`Expected three kubernetes services but found ${k8Services.length}`);
return;
}
console.log(k8Services[0])
console.log(k8Services[0].asType(k8s.core.v1.Service))
The match works for finding 3 of them and prints the policyResource output in the first log. The second log after i try to cast it, just prints {}