Skip to content

Do not ignore objects without pod template in dangling-horizontalpodautoscaler #933

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

Closed
wants to merge 1 commit into from

Conversation

mboutet
Copy link

@mboutet mboutet commented Mar 19, 2025

Fixes #932.

I personally don't understand why the object referenced in the scaleTargetRef of the HPA needs to have a pod template in its manifest. I find this pre-condition to be out of scope for this check. The check should only ensure that the referenced object in scaleTargetRef exists in the linting context. There are way too many custom resources that have the /scale sub-resource without defining by default a pod template in their manifest.

I also checked the original PR #271 implementing this check and I could not find any comment or commits explaining why this pre-condition is necessary.

@mboutet mboutet requested a review from rhybrillou as a code owner March 19, 2025 13:12
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.01%. Comparing base (dbd7529) to head (f5e851b).
Report is 102 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #933      +/-   ##
==========================================
- Coverage   62.36%   59.01%   -3.35%     
==========================================
  Files         197      201       +4     
  Lines        4854     5829     +975     
==========================================
+ Hits         3027     3440     +413     
- Misses       1439     1994     +555     
- Partials      388      395       +7     
Flag Coverage Δ
unit 59.01% <ø> (-3.35%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@mboutet mboutet changed the title Do not ignore objects without pod specs in dangling-horizontalpodautoscaler Do not ignore objects without pod template in dangling-horizontalpodautoscaler Mar 19, 2025
@mboutet
Copy link
Author

mboutet commented Mar 20, 2025

Well, never mind, the issue is actually that kube-linter doesn't parse all custom objects and my issues was with a KafkaNodePool custom resource targeted by an HPA.

@mboutet mboutet closed this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why ignore objects without pods in the dangling-hpa check?
1 participant