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

deployment-webdriver with nodeAffinity #149

Closed

Conversation

rfrozza
Copy link
Contributor

@rfrozza rfrozza commented Jan 10, 2025

What this PR does
If the cluster uses nodes with both architectures (ARM64 and AMD64), "nodeAffinity" ensures the pod is scheduled in an AMD64 node.

Why we need it
Because selenium/standalone-chrome supports only linux/amd64 (at least for now).

Deployment with "nodeAffinity" ensures the pod is scheduled in a node with AMD64 architecture.
@rfrozza rfrozza requested a review from aeciopires as a code owner January 10, 2025 14:50
@fibbs
Copy link
Contributor

fibbs commented Jan 10, 2025

Good one, but I have some comments:
While affinity would probably work, I would prefer nodeSelector to be used for this purpose, which goes directly into a deployment's spec.template.nodeSelector, like this one:

      nodeSelector:
        kubernetes.io/arch: amd64

And actually, we do have nodeSelector in our values.yaml, but unfortunately it has not been implemented in the webdriver deployment.

I would suggest the following:

  • additionally to the global nodeSelector, make it possible in values.yaml to set a nodeSelector for every component that this Helmchart deploys (like zabbixServer.nodeSelector, postgresql.nodeSelector, etc.)
  • in all the deployments, statefulsets, etc. (of course including the one for webdriver) make sure nodeSelector is being honored, taking precedence of the components nodeSelector` and defaulting either to the global one or to nothing
  • set a proper nodeSelector for the webdriver deployment in standard values.yaml to amd64

I think this would be the more generalistic, flexible and clear solution.

Would you like to rework your PR?

@aeciopires
Copy link
Member

aeciopires commented Jan 11, 2025

I agree with you @fibbs!

@rfrozza, could you adjust your PR to implement @fibbs suggestions?

@aeciopires aeciopires added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Jan 11, 2025
Copy link
Member

@aeciopires aeciopires left a comment

Choose a reason for hiding this comment

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

Request changes

@rfrozza
Copy link
Contributor Author

rfrozza commented Jan 13, 2025

Thanks @fibbs and @aeciopires!
I'll implement those changes for all objects and update the PR.

@rfrozza rfrozza closed this Jan 14, 2025
@rfrozza rfrozza deleted the rfrozza-patch-nodeAffinity branch January 14, 2025 14:04
@aeciopires
Copy link
Member

PS.: @rfrozza made adjusts in this PR: #156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants