Skip to content

Report top-level owners for pods#56

Merged
unflxw merged 1 commit into
mainfrom
add-owner-references
Jul 17, 2025
Merged

Report top-level owners for pods#56
unflxw merged 1 commit into
mainfrom
add-owner-references

Conversation

@unflxw

@unflxw unflxw commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

Fixes #53. See protocol change at https://github.com/appsignal/appsignal-protocol/pull/125.

For each pod, report the top-level owner resources for those pods, that is, the transitive owners which are not owned by any other resources. Note that a pod may have more than one owner, and therefore it can also have more than one top-level owner.

Update the kube crate to version 1.1.0 and the k8s-openapi crate to version 0.25.0. Use the "earliest" feature instead of "latest" to support most API server versions, though there is no significant difference in support regardless.

Update the Rust version to 1.82.0 to be able to use a recent version of the kube crate.

Implement a cache for ownership resolution and API discovery. The discovery results are kept between runs, but can be refreshed if resources from new APIs are referenced. The ownership cache is reset during each run, as the ownership relationships can change at any time.

Improve trace logging. Do not panic! when AppSignal or Kubernetes are unreachable.

Update the deployment YAML to provide read-only permissions to all
API groups and resources -- this is necessary due to the owner
traversal logic needing to be able to retrieve arbitrary resources.

Update the deployment YAML for Helm as well, and fix the version
updating script to update the version number on it as well.

@unflxw
unflxw requested a review from tombruijn July 11, 2025 15:10
@unflxw unflxw self-assigned this Jul 11, 2025
@unflxw unflxw added the enhancement An improvement to an existing feature. label Jul 11, 2025
@backlog-helper

Copy link
Copy Markdown

Hi @unflxw,

We've found some issues with your Pull Request.

  • This Pull Request does not include a changeset. Add a changeset if the change impacts users and should be included in the changelog upon release. Read more about changesets.
    Ignore this rule by adding [skip changeset] to your Pull Request body. - (More info)

New issue guide | Backlog management | Rules | Feedback

@unflxw
unflxw force-pushed the add-owner-references branch 4 times, most recently from 753121b to 7e1e3dd Compare July 14, 2025 09:44
@backlog-helper

This comment has been minimized.

2 similar comments
@backlog-helper

This comment has been minimized.

@backlog-helper

Copy link
Copy Markdown

This is a message from the daily scheduled checks.

New issue guide | Backlog management | Rules | Feedback

@tombruijn tombruijn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to add a changeset.

Comment thread script/write_version Outdated
unflxw added a commit that referenced this pull request Jul 17, 2025
There's something broken with the existing logic for updating the
Helm chart. It will be fixed as part of #56, but in the meantime
this commit updates it manually.
For each pod, report the top-level owner resources for those pods,
that is, the transitive owners which are not owned by any other
resources. Note that a pod may have more than one owner, and therefore
it can also have more than one top-level owner.

Update the `kube` crate to version 1.1.0 and the `k8s-openapi` crate
to version `0.25.0`. Use the "earliest" feature instead of "latest"
to support most API server versions, though there is no significant
difference in support regardless.

Update the Rust version to 1.82.0 to be able to use a recent version
of the `kube` crate.

Implement a cache for ownership resolution and API discovery. The
discovery results are kept between runs, but can be refreshed if
resources from new APIs are referenced. The ownership cache is reset
during each run, as the ownership relationships can change at any
time.

Improve trace logging. Do not `panic!` when AppSignal or Kubernetes
are unreachable.

Update the deployment YAML to provide read-only permissions to all
API groups and resources -- this is necessary due to the owner
traversal logic needing to be able to retrieve arbitrary resources.

Update the deployment YAML for Helm as well, and fix the version
updating script to update the version number on it as well.
@unflxw
unflxw force-pushed the add-owner-references branch from 7e1e3dd to 6aeaf5c Compare July 17, 2025 16:47
@unflxw
unflxw merged commit bf18eb4 into main Jul 17, 2025
3 checks passed
unflxw added a commit that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An improvement to an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collect ownerReferences

2 participants