Add optional AZ awareness topology constraints - #176
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbc203a5e5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| topologySpreadConstraints: | ||
| {{- toYaml $tsc | nindent 8 }} | ||
| {{- if .Values.azAwareness.enabled }} | ||
| {{- include "quickwit.azTopologySpreadConstraint" (include "quickwit.indexer.selectorLabels" .) | nindent 8 }} |
There was a problem hiding this comment.
Avoid duplicating zone spread constraints
When an install already sets a global or indexer topologySpreadConstraints entry with topologyKey: topology.kubernetes.io/zone and whenUnsatisfiable: ScheduleAnyway, enabling azAwareness unconditionally prepends another constraint with the same pair before rendering the user-supplied list. Kubernetes only permits one topologySpreadConstraint for each topologyKey/whenUnsatisfiable pair, so that common existing zone-spread configuration renders an invalid StatefulSet and blocks the upgrade; skip or merge the generated constraint when the user already supplies one.
Useful? React with 👍 / 👎.
| topologySpreadConstraints: [] | ||
|
|
||
| # Availability Zone awareness | ||
| azAwareness: |
There was a problem hiding this comment.
I’d prefer not to introduce a dedicated azAwareness value here. The more values we add, the more featurs we need to support, so I’d like to keep this as minimal as possible.
The chart already exposes indexer.topologySpreadConstraints and indexer.serviceAnnotations, so could we use those instead?
Adds AZ aware routing to the Quickwit Indexer Kubernetes service. The actual API for getting the AZ from a node is only default-enabled as of Kubernetes 1.35. It's off by default and is opt-in.