-
Notifications
You must be signed in to change notification settings - Fork 0
Support K8s Pod affinity configuration for Pod scheduling #12
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
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 support for Kubernetes Pod affinity configuration to control Pod scheduling, enabling the operator to avoid running on DOKS default nodes.
Changes:
- Added affinity configuration support in the application configuration with both property-based and expression-based definitions
- Created a Kubernetes deployment manifest template with an empty affinity configuration
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| operator/src/main/resources/application.yml | Added affinity configuration property and Helm template expression for Pod scheduling |
| operator/src/main/kubernetes/kubernetes.yml | Created deployment manifest template with affinity placeholder |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| affinity: | ||
| expression: "{{- toYaml (.Values.app.affinity | default dict) | nindent 8 }}" | ||
| path: (kind == Deployment).spec.template.spec.affinity |
Copilot
AI
Jan 29, 2026
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.
The affinity configuration is defined twice: once as a property (lines 107-111) and once as an expression (lines 125-127). This duplication could lead to confusion about which configuration takes precedence or how they interact. Consider documenting the relationship between these two definitions or consolidating them if they serve the same purpose.
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.
We need both, one for the default value and description in the generated README.md, the other for the newline and indentation of the affinity block.
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.
I asked already about the license in another PR. What type of license is this? And why is not our general license enough on the project?
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.
I accidentally committed the LICENSE file on the other PR branch and reverted it again.
As mentioned in my other comment #13 (comment), the LICENSE file is MIT and has been added to this folder, as the Quarkus Helm extension will package it with the automatically built *.tgz Helm chart archive.
I wanted the LICENSE to be also present there.
I copied it from https://github.com/aboutbits/react-ui/blob/main/license.md
All our projects are MIT.
This is required so we can configure the Operator Pod to not run on the DOKS default node.