Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/lfx-v2-query-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ kind: Deployment
metadata:
name: lfx-v2-query-service
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
Comment on lines 6 to +10
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

PR title/description say Backstage requires a deployment annotation for discovery, but this change adds a standard app.kubernetes.io/name label on the Deployment metadata. If Backstage ingestion is expecting an annotation (or a specific Backstage key like backstage.io/...), this won’t satisfy the stated requirement—please add the correct annotation/key at metadata.annotations (and, if discovery uses labels/selectors, ensure it’s applied to the resources Backstage queries, e.g., Deployment/Service and/or pod template labels as appropriate).

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +10
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot Apr 13, 2026

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

For Backstage Kubernetes ingestion, which exact Kubernetes metadata key is required for workload discovery in this case, and must it be an annotation or a label on Deployment metadata?

💡 Result:

The exact Kubernetes metadata key required for workload discovery in Backstage Kubernetes ingestion is backstage.io/kubernetes-id. It must be a label on the Deployment metadata.

Citations:


Backstage requirement unmet: missing the backstage.io/kubernetes-id label.

The PR adds app.kubernetes.io/name for standard Kubernetes labeling, but Backstage Kubernetes ingestion requires a backstage.io/kubernetes-id label on Deployment metadata to discover workloads. Without this label, Backstage ingestion will fail.

Suggested adjustment
 metadata:
   name: lfx-v2-query-service
   namespace: {{ .Release.Namespace }}
   labels:
     app.kubernetes.io/name: {{ .Chart.Name }}
+    backstage.io/kubernetes-id: {{ .Chart.Name }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
labels:
app.kubernetes.io/name: {{ .Chart.Name }}
backstage.io/kubernetes-id: {{ .Chart.Name }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@charts/lfx-v2-query-service/templates/deployment.yaml` around lines 9 - 10,
Add the missing Backstage discovery label by updating the Deployment metadata
labels to include the key backstage.io/kubernetes-id; set its value to a stable
unique identifier for the release (for example derived from the Helm chart/name
or the chart helper used elsewhere such as the fullname helper), alongside the
existing app.kubernetes.io/name (refer to the labels block and Chart.Name in the
deployment template) so Backstage can ingest the workload.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This label is added on the backstage side, not on the deployment.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@agaetep, thank you for the clarification! You're right. There are two ways to surface Kubernetes components as part of a Backstage entity. The backstage.io/kubernetes-id annotation can be added to the entity's catalog-info.yaml rather than to the Kubernetes Deployment itself — meaning Backstage-side configuration can handle that mapping without modifying the deployment manifest. My earlier suggestion was incorrect for your setup. The app.kubernetes.io/name label this PR adds is the right approach for your architecture.

(´• ω •`) ʕ•ᴥ•ʔ


✏️ Learnings added
Learnt from: agaetep
Repo: linuxfoundation/lfx-v2-query-service PR: 43
File: charts/lfx-v2-query-service/templates/deployment.yaml:9-10
Timestamp: 2026-04-13T18:55:45.267Z
Learning: For the `lfx-v2-query-service` repository, Backstage Kubernetes ingestion is configured on the Backstage catalog entity side (via `backstage.io/kubernetes-id` annotation in `catalog-info.yaml`), not by adding `backstage.io/kubernetes-id` labels to the Kubernetes Deployment manifest. The Deployment only needs the standard `app.kubernetes.io/name` label for Backstage discovery via label selector.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -19,6 +21,7 @@ spec:
{{- end }}
labels:
app: lfx-v2-query-service
app.kubernetes.io/name: {{ .Chart.Name }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
Loading