-
Notifications
You must be signed in to change notification settings - Fork 349
feature(helm): Add support for affinities for main deployments #1086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds affinity configuration support to multiple Helm charts, enabling users to configure pod affinity rules for better workload placement control in Kubernetes deployments.
- Adds
affinityconfiguration fields to values files for querydoc, grafana-mcp, and kagent charts - Implements affinity settings in corresponding deployment templates
- Provides consistent configuration options across different chart components
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| helm/tools/querydoc/values.yaml | Adds affinity configuration field with empty default |
| helm/tools/querydoc/templates/deployment.yaml | Implements affinity template block in pod spec |
| helm/tools/grafana-mcp/values.yaml | Adds affinity configuration field with empty default |
| helm/tools/grafana-mcp/templates/deployment.yaml | Implements affinity template block in pod spec |
| helm/kagent/values.yaml | Adds affinity configuration fields for root, controller, ui, and kagent-tools components with documentation comments |
| helm/kagent/templates/ui-deployment.yaml | Implements affinity template block for ui component |
| helm/kagent/templates/controller-deployment.yaml | Implements affinity template block for controller component |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dhouti <l.rex.via@gmail.com>
585e10e to
80ad7cc
Compare
| # -- Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | ||
| nodeSelector: {} | ||
|
|
||
| # Affintities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Affintities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ | |
| # Affinities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ |
| # -- Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | ||
| nodeSelector: {} | ||
|
|
||
| # Affintities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Affintities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ | |
| # Affinities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ |
| # -- Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | ||
| nodeSelector: {} | ||
|
|
||
| # Affintities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Affintities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ | |
| # Affinities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ |
| # -- Node taints which will be tolerated for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | ||
| tolerations: [] | ||
|
|
||
| # -- Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | ||
| nodeSelector: {} | ||
|
|
||
| # Affintities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ | ||
| affinity: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order for these to take effect you'll have to update the helm chart for the tools in https://github.com/kagent-dev/tools
| # -- Node taints which will be tolerated for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | ||
| tolerations: [] | ||
|
|
||
| # -- Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | ||
| nodeSelector: {} | ||
|
|
||
| # Affinities for `Pod` https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/ | ||
| affinity: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these actually used anywhere? The templates seem to just check their namespaces values
Helm charts do not currently support
affinity.This PR adds basic support for scheduling the main workloads with affinities.
This is sometimes an ideal choice over
nodeSelector.Ideally these would also be added to the
toolsandkmcpcharts.