kube-linter icon indicating copy to clipboard operation
kube-linter copied to clipboard

feat: add env-value-from as opt-in check for #705

Open Nexusrex18 opened this issue 4 months ago • 3 comments

Implements env-value-from check from #705 as opt-in (via config.yaml 'include'). If maintainers prefer, can add to default checks in a follow-up.

Nexusrex18 avatar Oct 06 '25 10:10 Nexusrex18

Codecov Report

:x: Patch coverage is 86.20690% with 20 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 29.11%. Comparing base (dbd7529) to head (816e9ff). :warning: Report is 210 commits behind head on main.

Files with missing lines Patch % Lines
pkg/templates/envvarvaluefrom/template.go 87.69% 12 Missing and 4 partials :warning:
...ates/envvarvaluefrom/internal/params/gen-params.go 73.33% 2 Missing and 2 partials :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1032       +/-   ##
===========================================
- Coverage   62.36%   29.11%   -33.25%     
===========================================
  Files         197      237       +40     
  Lines        4854     6405     +1551     
===========================================
- Hits         3027     1865     -1162     
- Misses       1439     4378     +2939     
+ Partials      388      162      -226     
Flag Coverage Δ
unit 29.11% <86.20%> (-33.25%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 06 '25 22:10 codecov[bot]

@janisz have made the changes you suggested

Nexusrex18 avatar Dec 07 '25 23:12 Nexusrex18

@janisz Thanks for the suggestions and pointing out some of my mistakes and I worked on them as suggested. I have added some new tests as follows:

  1. ConfigMap failing test
  2. ConfigMap passing test
  3. Missing ConfigMap failing test
  4. Missing Secret failing test

Nexusrex18 avatar Dec 12 '25 22:12 Nexusrex18

Nice! Thank you for your contribution!

I plan to release once get https://github.com/stackrox/kube-linter/pull/1045 merged

janisz avatar Dec 16 '25 12:12 janisz