-
Notifications
You must be signed in to change notification settings - Fork 249
feature(lint): Add linter to priorityClassName #926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @rhybrillou and @janisz! Can you spend some time reviewing this PR? If there's any feedback about this approach, I will be happy to follow up on it. 😄 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #926 +/- ##
===========================================
- Coverage 62.36% 28.64% -33.72%
===========================================
Files 197 203 +6
Lines 4854 5872 +1018
===========================================
- Hits 3027 1682 -1345
- Misses 1439 4075 +2636
+ Partials 388 115 -273
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
13ca337
to
0010896
Compare
This comment was marked as resolved.
This comment was marked as resolved.
@rhybrillou can you review this PR? |
@jonathanmdr Thank you very much for your contribution. I'll target a new kube-linter release including it by the end of the week. |
This pull request introduces a new check for validating priority class names in Kubernetes objects. The changes include the addition of a new template, corresponding parameters, and test cases. The most important changes are summarized below:
Issues:
New Template and Parameters:
pkg/templates/priorityclassname/template.go
: Added a new templatepriority-class-name
to flag applications running with invalid priority class names.pkg/templates/priorityclassname/internal/params/gen-params.go
: Generated code for handling parameters related to the new template.pkg/templates/priorityclassname/internal/params/params.go
: Defined theParams
struct to hold the accepted priority class names.Test Cases:
pkg/templates/priorityclassname/template_test.go
: Added test cases to validate the new template for different scenarios, including valid, invalid, and empty priority class names.Configuration and Integration:
pkg/builtinchecks/yamls/priority-class-name.yaml
: Added a new check configuration forpriority-class-name
.pkg/templates/all/all.go
: Imported the new template to ensure it is included in the build.E2E Tests:
e2etests/bats-tests.sh
: Added an end-to-end test for the newpriority-class-name
check.tests/checks/priority-class-name.yaml
: Added YAML configurations for testing the new check.