feat: add pod scheduling support for operator HA#213
Open
jetroberts wants to merge 1 commit intoakyriako:mainfrom
Open
feat: add pod scheduling support for operator HA#213jetroberts wants to merge 1 commit intoakyriako:mainfrom
jetroberts wants to merge 1 commit intoakyriako:mainfrom
Conversation
- Add affinity, nodeSelector, tolerations to Helm values - Update deployment template to use scheduling fields - Add HA configuration example to README - Bump chart version to 0.3.6 Fixes akyriako#209
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #209 - Adds pod scheduling configuration support for operator controller pods to enable high availability deployments.
Problem
When deploying the operator with multiple replicas for HA, pods could be scheduled on the same node, undermining fault tolerance. Users had no way to configure pod anti-affinity or other scheduling constraints.
Solution
Added support for
affinity,nodeSelector, andtolerationsin Helm values, following the same pattern used by the TypesenseCluster CRD.Changes
values.yaml): Addedaffinity,nodeSelector,tolerationsfields (opt-in, empty by default)deployment.yaml): Wire values to pod spec using{{- with }}blocksChart.yaml): Bumped to 0.3.6README.md): Added HA configuration section with exampleTesting
✅ Helm chart lints successfully
✅ Default configuration renders without affinity (backward compatible)
✅ HA configuration with anti-affinity renders correctly
✅ Deployed on Kind 2-node cluster - pods scheduled on different nodes
✅ Pod rescheduling works correctly with anti-affinity constraints
✅ Leader election works with multiple replicas
Example Usage
Backward Compatibility
✅ Fully backward compatible
{}or[])Files Changed
charts/typesense-operator/values.yaml(+3 lines)charts/typesense-operator/templates/deployment.yaml(+9 lines)charts/typesense-operator/Chart.yaml(version bump)charts/typesense-operator/README.md(+23 lines)Total: 4 files changed, 36 insertions(+), 1 deletion(-)