Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions charts/lfx-v2-indexer-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ spec:
app: lfx-v2-indexer-service
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
app: lfx-v2-indexer-service
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

podLabels are rendered after the required app: lfx-v2-indexer-service label. If a user sets podLabels.app, the rendered YAML will contain duplicate app keys and can override/break the pod label so it no longer matches spec.selector.matchLabels, causing the Deployment to stop managing its Pods. Consider preventing overrides of selector-critical labels (e.g., omit/ignore reserved keys like app, or explicitly merge labels giving precedence to the chart’s required labels and/or fail template rendering when a reserved key is provided).

Suggested change
{{- toYaml . | nindent 8 }}
{{- $podLabels := omit . "app" }}
{{- toYaml $podLabels | nindent 8 }}

Copilot uses AI. Check for mistakes.
{{- end }}
spec:
terminationGracePeriodSeconds: {{ .Values.app.terminationGracePeriodSeconds }}
containers:
Expand Down
4 changes: 4 additions & 0 deletions charts/lfx-v2-indexer-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ app:
# (default: "tracecontext,baggage")
propagators: "tracecontext,baggage,jaeger"

podAnnotations: {}

Comment on lines 106 to +112
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

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

New top-level values podAnnotations and podLabels are added without any description, while the rest of values.yaml uses inline comments to document each section/field. Add brief comments (and ideally an example) explaining what these maps apply to (Pod template metadata) and any restrictions (e.g., avoiding selector labels like app).

Suggested change
podAnnotations: {}
# podAnnotations are applied to the Pod template metadata
# Example:
# podAnnotations:
# prometheus.io/scrape: "true"
podAnnotations: {}
# podLabels are extra labels applied to the Pod template metadata
# Avoid labels that are used in selectors (e.g. "app") to prevent rollout issues
# Example:
# podLabels:
# role: "indexer-worker"

Copilot uses AI. Check for mistakes.
podLabels: {}

# image is the configuration for the container image
image:
# repository is the container image repository
Expand Down