Skip to content
Open
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
20 changes: 20 additions & 0 deletions charts/lfx-v2-indexer-service/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright The Linux Foundation and each contributor to LFX.
# SPDX-License-Identifier: MIT
{{- if .Values.podDisruptionBudget.enabled }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: lfx-v2-indexer-service
namespace: lfx
spec:
selector:
matchLabels:
app: lfx-v2-indexer-service
{{- with .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ . }}
{{- end }}
{{- with .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ . }}
{{- end }}
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.

minAvailable and maxUnavailable are mutually exclusive for PodDisruptionBudgets; if a user sets both values, this template will render both fields and Kubernetes will reject the manifest. Add a guard/validation to prevent both from being set at the same time (and provide a clear error message).

Copilot uses AI. Check for mistakes.
{{- end }}
5 changes: 5 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,11 @@ app:
# (default: "tracecontext,baggage")
propagators: "tracecontext,baggage,jaeger"

podDisruptionBudget:
enabled: false
# minAvailable: 1
# maxUnavailable: 1

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