Skip to content

Commit

Permalink
fix: enabled OPA validation for preview resources and resources refer…
Browse files Browse the repository at this point in the history
…red to by kustomizations
  • Loading branch information
olensmar committed May 5, 2022
1 parent 741189c commit 344f0ae
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/redux/services/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ function getErrorPosition(valueNode: ParsedNode, lineCounter: LineCounter | unde
}

export function validatePolicies(resource: K8sResource, policies: Policy[]): ResourceValidationError[] {
if (resource.filePath.startsWith('preview://')) {
return [];
}
if (isManagedByKustomize(resource)) {
return [];
}
Expand Down Expand Up @@ -75,10 +72,6 @@ function isManagedByKustomize(resource: K8sResource): boolean {
return true;
}

if (resource.refs?.some(hasKustomizationReference)) {
return true;
}

return false;
}

Expand Down

0 comments on commit 344f0ae

Please sign in to comment.