Repository navigation
feat(kubernetes): copy allowlisted placeholder labels onto the real pod - #145
Merged
InftyAI-Agent merged 1 commit intoNov 16, 2026
Merged
Conversation
--kubernetes-propagate-labels names placeholder label keys the real pod carries in the target cluster, on top of --cost-labels, so a log pipeline selecting workloads by label (app, say) finds kubernetes sandboxes as it does Modal's. Values are copied unchanged; Nebula's own labels are refused at startup, and the default (empty) copies only --cost-labels. It is an allowlist because, in the host cluster, the real pod shares the placeholder's namespace: a controller label such as pod-template-hash would let the placeholder's owner adopt it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues blocking the configurable Kubernetes label-propagation change.
No open issues 🎉
What changed in this PR
Adds configurable label propagation from placeholder pods to real pods in the Kubernetes provider, preserving cost-label propagation by default.
Changes:
- Introduces
--kubernetes-propagate-labelswith startup validation for invalid, duplicate, and Nebula-owned keys. - Passes the combined label allowlist to pod creation and extends provider tests.
- Documents label-selection risks and remote-cluster log-forwarding checks.
| File | Description |
|---|---|
pkg/provider/kubernetes/pod.go |
Validates propagation keys and copies allowlisted labels. |
pkg/provider/kubernetes/kubernetes.go |
Threads the combined label allowlist through provisioning. |
pkg/provider/kubernetes/kubernetes_test.go |
Tests parsing, propagation, and protected-label handling. |
docs/multi-cluster.md |
Documents label safety and log-forwarding verification. |
cmd/main.go |
Registers and validates the flag, combining it with cost-label keys. |
Review effort: Balanced
Member
Author
|
/lgtm |
InftyAI-Agent
approved these changes
Nov 16, 2026
InftyAI-Agent
left a comment
Member
There was a problem hiding this comment.
Approved: PR has both lgtm and approved labels
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.
What
A new manager flag,
--kubernetes-propagate-labels, lists placeholder label keys the kubernetes provider copies onto the real pod in the target cluster, on top of the--cost-labelskeys. For example,--kubernetes-propagate-labels=applets a log pipeline that selects workloads byappfind kubernetes sandboxes the way it finds Modal's.--cost-labels, which is the current behavior.nebula.inftyai.com/*,app.kubernetes.io/managed-by) are refused.Why an allowlist
In the host cluster the real pod shares the placeholder's namespace. A controller label such as
pod-template-hashwould let the placeholder's owner adopt it, and anything selecting on labels (a Service, a PodDisruptionBudget, an operator) would count the sandbox twice.docs/multi-cluster.mdgains a "Labels on the real pod" section saying so.Testing
TestParsePropagateLabelsplus provider tests for the propagated set.go test ./...(non-e2e) andmake lintpass.🤖 Generated with Claude Code