Fix k8s workload attestor Broker API config docs and remove dead code#7112
Merged
Conversation
Signed-off-by: Agustín Martínez Fayó <amartinezfayo@gmail.com>
amartinezfayo
requested review from
MarcosDY,
rturner3 and
sorindumitru
as code owners
July 2, 2026 13:44
There was a problem hiding this comment.
Pull request overview
Follow-up to Broker API support in the k8s workload attestor, focusing on aligning documentation/examples with the plugin’s current experimental config shape and removing now-dead scope-check logic from the attestation implementation.
Changes:
- Removed dead
checkPodReferenceScopelogic and its call sites in the k8s workload attestor. - Reworked k8s workload attestor plugin docs to present experimental settings in a dedicated sub-table.
- Updated
agent_full.confk8s plugin example to nestbrokerunderexperimentaland include the missingexperimental.api_server.cache.enabledexample.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pkg/agent/plugin/workloadattestor/k8s/k8s.go | Removes unreachable pod-scope validation helper and call sites. |
| doc/plugin_agent_workloadattestor_k8s.md | Moves experimental options into a dedicated “experimental” configuration sub-table. |
| conf/agent/agent_full.conf | Updates the k8s plugin example to correctly nest Broker/API server cache config under experimental. |
Signed-off-by: Agustín Martínez Fayó <amartinezfayo@gmail.com>
matheuscscp
approved these changes
Jul 2, 2026
matheuscscp
left a comment
Contributor
There was a problem hiding this comment.
Good catch! Since now we only look at the kubelet results for the agent_node scope, we no longer need this explicit check. Another good thing is that we no longer need to rely on the node name being properly configured in the plugin :)
Great catch on the docs as well!
Signed-off-by: Agustín Martínez Fayó <amartinezfayo@gmail.com>
MarcosDY
approved these changes
Jul 2, 2026
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.
The SPIFFE Broker API support for the
k8sworkload attestor merged in #6915. This is a small follow-up addressing a few items noted during that review.The
agent_full.confexample for thek8splugin still placed thebrokerblock at the top level ofplugin_data, but the plugin now expects it underexperimental, so uncommenting the example as written would be rejected as an unknown key. This nests thebrokerblock underexperimentaland adds the missingexperimental.api_server.cache.enabledexample.The plugin documentation listed the experimental options as fully-qualified dotted rows in the main configuration table. This moves them into a dedicated experimental configuration sub-table, matching how
spire_agent.md,spire_server.md, and theupstreamauthority_spireplugin doc present experimental settings.Finally,
checkPodReferenceScopebecame dead code onceagent_nodepod resolution was limited to the kubelet and stopped falling back to the API server. It was only reachable on thecluster-scope path, where it is a no-op, so this removes the function and its two call sites.