Closed doronkg closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 40.96%. Comparing base (
852a6f9
) to head (77155bc
). Report is 1 commits behind head on main.
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Rebasing issues, I’ll re-submit it.
We should add a way to sort the JSON (alphabetize it) as well.
What this PR does / why we need it?
This PR add a
hack
folder into kor, to include future useful scripts for contributors. It also includes the initial scriptfind_exceptions.sh
to discover false-positive default resources, the output of this script could be merged topkg/kor/exceptions
to be ignored by kor.This script should be used in issues like #236, #240 for intsance.
Output Example
```console $ ./find_exceptions.sh Processing completed for ConfigMaps, output saved to exceptions/configmaps.json Processing completed for Secrets, output saved to exceptions/secrets.json Processing completed for ServiceAccounts, output saved to exceptions/serviceaccounts.json $ cat exceptions/configmaps.json { "exceptionConfigMaps": [ { "Namespace": "kube-system", "ResourceName": "bootstrap" }, { "Namespace": "kube-system", "ResourceName": "cluster-config-v1" }, { "Namespace": "kube-system", "ResourceName": "openshift-service-ca.crt" }, { "Namespace": "kube-system", "ResourceName": "root-ca" } ] } ```PR Checklist
GitHub Issue
[XX-XX]
Notes for your reviewers
The
find_exceptions.sh
does not squash resources that appear in multiple namespaces, for example, if a ConfigMap is created in every namespace, the output will not display as so:The script eases the process to map the default resources, but requires manual intervention (regex, merging, etc).