Skip to content

Merge ServiceSpec podAnnotations onto rendered Infera pods. - #180

Merged
jiejingzhangamd merged 3 commits into
mainfrom
feat/idep-pod-annotations
Oct 8, 2026
Merged

jiejingzhangamd merged 3 commits into
mainfrom
feat/idep-pod-annotations

Conversation

@weilei0120

Copy link
Copy Markdown
Collaborator

Description

Please include a brief summary of the changes, relevant motivation and context.

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Change A
  • Change B

Checklist:

  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copilot AI balanced review requested due to automatic review settings October 5, 2026 13:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

LeaderWorkerSet reconciliation retains annotations after they are removed from the service specification.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds service-level pod annotations to rendered Infera workloads.

Changes:

  • Adds ServiceSpec.PodAnnotations and CRD schemas.
  • Applies annotations to standard and custom pod templates.
  • Adds annotation propagation coverage.
File Description
builders.go Propagates annotations to pod templates.
builders_test.go Tests annotation propagation.
inferadeployment_types.go Defines the new API field.
zz_generated.deepcopy.go Deep-copies annotation maps.
config/​crd/​bases/​infera.amd.com_inferadeployments.yaml Updates the base CRD schema.
helm/​infera-operator/​crds/​infera.amd.com_inferadeployments.yaml Updates the Helm CRD schema.
Files not reviewed (1)
  • deploy/operator/api/v1alpha1/zz_generated.deepcopy.go: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

func podObjectMeta(idepName, svcName string, svc inferav1alpha1.ServiceSpec) metav1.ObjectMeta {
return metav1.ObjectMeta{
Labels: podLabelsFor(idepName, svcName, svc),
Annotations: podAnnotationsFor(svc),
weilei and others added 2 commits October 8, 2026 06:44
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: weilei <leiwei12@amd.com>
Service pod labels and annotations still override the same keys, and the operator selector labels stay last so selection does not change.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: weilei <leiwei12@amd.com>
@weilei0120
weilei0120 force-pushed the feat/idep-pod-annotations branch from 31b85d2 to 3b12d93 Compare October 8, 2026 06:44
Service pod labels and annotations are still applied as written, and a removed key is cleared from the LeaderWorkerSet worker template.

Signed-off-by: weilei <leiwei12@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@jiejingzhangamd
jiejingzhangamd merged commit ff75ec6 into main Oct 8, 2026
11 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants