Feature: pod annotation metadata - #2399
Open
nyadav4-ai wants to merge 6 commits into
Open
Conversation
Add a JSON-encoded `annotations` string to PodUpdate so pod annotations can be propagated through the metadata pipeline, mirroring the existing `labels` field. Regenerates the Go proto.
Filter pod annotations to an operator-configured allowlist (`pod_annotation_allowlist`) before emitting them in pod updates. Annotations can be large/noisy (e.g. last-applied-configuration), so an empty allowlist captures nothing by default.
Plumb the new annotations field into PodInfo so the agent-side metadata state retains pod annotations for downstream consumers.
Expose pod annotations to PxL via a new UDF, analogous to pod_id_to_pod_labels.
Surface the pod annotation allowlist as an env var on the metadata deployment and statefulset so it is configurable at deploy time.
metadata: consolidate pod annotation allowlist test into handler test Move the pod annotation allowlist coverage out of the standalone k8s_metadata_annotations_test.go and into k8s_metadata_handler_test.go, alongside the other handler tests. The test now exercises the allowlist end-to-end through NewHandler.
nyadav4-ai
requested a deployment
to
pr-actions-approval
July 27, 2026 09:29 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Adds Kubernetes pod annotations to Pixie's metadata pipeline, mirroring the existing pod-labels support. Pod annotations often carry operationally useful metadata (team/ownership tags, GitOps/CI info, config checksums), which was previously not queryable in Pixie.
Relevant Issues: #2398
Type of change: /kind api-change
Test Plan:
TestHandler_PodAnnotationAllowlistink8s_metadata_handler_test.go), covering empty/nil allowlists, allowed keys, and non-matching keys. The test drives the allowlist end-to-end throughNewHandlerand the NATS update path.PodInfo(metadata_state_test.cc).pod_id_to_pod_annotationsoutput (metadata_ops_test.cc).PL_POD_ANNOTATION_ALLOWLISTset and confirm allowlisted annotations appear viapx.pod_id_to_pod_annotationsin a PxL script, and that unlisted keys are dropped.Changelog Message:
Add support for capturing Kubernetes pod annotations in metadata (opt-in via the
PL_POD_ANNOTATION_ALLOWLISTallowlist), queryable in PxL withpx.pod_id_to_pod_annotations.