Skip to content
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

Save last podspec when walking owner hierarchy #748

Merged
merged 2 commits into from
Apr 25, 2022
Merged

Save last podspec when walking owner hierarchy #748

merged 2 commits into from
Apr 25, 2022

Conversation

rbren
Copy link
Contributor

@rbren rbren commented Apr 19, 2022

This PR fixes # #725

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

Sometimes the ultimate owner of a Pod does not contain a podSpec. Examples include the Prometheus Operator'sPrometheus CRD and Argo's Rollout CRD.

The goal here is to make sure we still capture pod-level findings for these resources.

What changes did you make?

  • Remove isFinalKind, which was an overly-specific heuristic for fixing this issue for the Prometheus CRD
  • Track the most recent podSpec as we walk up the owner hierarchy. If we reach a resource that doesn't have a podSpec, use the one from its child

What alternative solution should we consider, if any?

I think this is probably the best solution

@rbren rbren requested a review from makoscafee as a code owner April 19, 2022 12:46
@rbren rbren changed the title [WIP] try saving last podspec when walking owner hierarchy Save last podspec when walking owner hierarchy Apr 25, 2022
@rbren rbren merged commit c92819c into master Apr 25, 2022
@rbren rbren deleted the rb/pod-spec branch April 25, 2022 15:09
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.

2 participants