Conversation
- Add EmbeddedMetadata struct (labels + annotations) to api/v1alpha1/common_types.go - Add commonMetadata and podMetadata fields to AgentSpec and ToolServerSpec - Add commonMetadata and podMetadata fields to AgentGatewaySpec, AiGatewaySpec, ToolGatewaySpec (fields only) - Regenerate CRDs and deep copy via make manifests && make generate - Add helper functions applyCommonMetadataToObjectMeta and buildPodTemplateMetadata to util.go - Update Agent reconciler to apply metadata to Deployment, Service, and pod template - Update ToolServer reconciler to apply metadata to Deployment, Service, and pod template - Add integration tests for all metadata scenarios (162 tests all passing) Co-authored-by: g3force <779094+g3force@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add metadata to Agents and ToolServers for deployments
Add commonMetadata and podMetadata to Agent/ToolServer specs with reconciliation
Mar 3, 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.
Users have no way to attach custom labels or annotations to the Deployments, Services, or Pods managed by the operator — blocking common cluster patterns like team ownership labels, monitoring annotations, or Istio injection hints.
Changes
New API:
EmbeddedMetadatastructAdded
api/v1alpha1/common_types.gowith a sharedEmbeddedMetadatatype:CRD fields added
AgentSpecandToolServerSpec:commonMetadata+podMetadatawith full reconciliationAgentGatewaySpec,AiGatewaySpec,ToolGatewaySpec: fields added, reconciliation not implementedPropagation semantics
commonMetadata.labelscommonMetadata.annotationspodMetadata.labelspodMetadata.annotationspodMetadataoverridescommonMetadataon the pod template when keys conflictapp,framework) and selector labels always take precedenceExample usage
Implementation
applyCommonMetadataToObjectMeta()andbuildPodTemplateMetadata()helpers toutil.goto avoid duplication between the two reconcilersmake manifests && make generateOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.