Skip to content
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

Set node affinity for more pods to ensure they run on general node pool #2353

Merged
merged 9 commits into from
Mar 21, 2024

Conversation

Adam-D-Lewis
Copy link
Member

@Adam-D-Lewis Adam-D-Lewis commented Mar 20, 2024

Reference Issues or PRs

Supercedes #2214

Solves

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • Did you test the pull request locally? Deployed on aws and checked
  • Did you add new tests?

Any other comments?

configuration_values = jsonencode({
controller = {
nodeSelector = {
"eks.amazonaws.com/nodegroup" = "general"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to pass this is as a variable rather than hard code it (as in src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/jupyterhub/main.tf)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think we support renaming node pools so I'm fine adding this as is.


configuration_values = jsonencode({
nodeSelector = {
"eks.amazonaws.com/nodegroup" = "general"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think we support renaming node pools so I'm fine adding this as is.

{
key = "eks.amazonaws.com/nodegroup"
operator = "In"
values = ["general"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think we support renaming node pools so I'm fine adding this as is.

Comment on lines +560 to +576
affinity = {
nodeAffinity = {
requiredDuringSchedulingIgnoredDuringExecution = {
nodeSelectorTerms = [
{
matchExpressions = [
{
key = var.node-group.key
operator = "In"
values = [var.node-group.value]
}
]
}
]
}
}
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good

@@ -57,7 +57,6 @@ resource "aws_eks_node_group" "main" {
]

tags = merge({
# "kubernetes.io/cluster/${var.name}" = "shared"
Copy link
Member Author

@Adam-D-Lewis Adam-D-Lewis Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fly by, removing commented out code

@Adam-D-Lewis Adam-D-Lewis requested a review from pt247 March 21, 2024 16:22
@Adam-D-Lewis
Copy link
Member Author

Ready for Review!

Copy link
Contributor

@dcmcand dcmcand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 thanks for getting this over the finish line @Adam-D-Lewis and thanks for the work here @sblair-metrostar

@Adam-D-Lewis Adam-D-Lewis merged commit 3b318a6 into develop Mar 21, 2024
26 checks passed
@Adam-D-Lewis Adam-D-Lewis deleted the general-node-affinity branch March 21, 2024 19:35
@viniciusdc viniciusdc added this to the 2024.3.3 milestone Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

4 participants