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

Add 'platformName' to selenium-grid scaler metadata structure #4038

Closed
gifflet opened this issue Dec 23, 2022 · 7 comments
Closed

Add 'platformName' to selenium-grid scaler metadata structure #4038

gifflet opened this issue Dec 23, 2022 · 7 comments
Assignees
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale-bot-ignore All issues that should not be automatically closed by our stale bot

Comments

@gifflet
Copy link
Contributor

gifflet commented Dec 23, 2022

Proposal

Currently, the selenium grid scaler only supports browserName and browserVersion capabilities in trigger metadata. This results in the impossibility of configuring a trigger for tests targeting specific platforms like Windows 10, Windows 11, etc.

Use-Case

If the platformName capability were supported it would be possible to configure a trigger like this:

triggers:
  - type: selenium-grid
    metadata:
      url: 'http://selenium-hub:4444/graphql'
      browserName: 'chrome'
      browserVersion: '108.0'
      unsafeSsl: 'true',
      platformName: 'Windows 10'

Anything else?

The possibility of defining the platformName would make sense if it were possible to run a virtual machine, equivalent to the platform defined in the capability platformName, in the pod. In Linux this is possible through the native feature called KVM (Kernel-based Virtual Machine). That is, the operating strategy would be to make this resource available to the linux container (through /dev/kvm) and within the container use qemu, for example, to run the virtual machine.

@gifflet gifflet added feature-request All issues for new features that have not been committed to needs-discussion labels Dec 23, 2022
@gifflet gifflet changed the title Add 'platformName' to selenium-grid scaler metadata structure and support to assign /dev/kvm devices to spawned pods Add 'platformName' to selenium-grid scaler metadata structure and support to assign /dev/kvm linux device to spawned pods Dec 23, 2022
@JorTurFer
Copy link
Member

JorTurFer commented Dec 23, 2022

Hi,
Basically you would like to have the plaformName field and filter by it in the selenium scaler, right? I mean, currently KEDA checks the queue size for the given browserName and you would like to use both parameters, browserName and platformName to be more accurate with the queue length for the specific case. Am I correct?

I don't understand the part of support to assign /dev/kvm linux device to spawned pods. KEDA doesn't assign anything, I mean, you have your workload and KEDA just expose metrics, if you want to assign/mount/whatever that path in your selenium agents, you have to do in your manifest, KEDA doesn't patch them anyhow. I feel that I'm missing something

@gifflet
Copy link
Contributor Author

gifflet commented Dec 23, 2022

Basically you would like to have the plaformName field and filter by it in the selenium scaler, right? I mean, currently KEDA checks the queue size for the given browserName and you would like to use both parameters, browserName and platformName to be more accurate with the queue length for the specific case. Am I correct?

Yeah, It's right.

I don't understand the part of support to assign /dev/kvm linux device to spawned pods. KEDA doesn't assign anything, I mean, you have your workload and KEDA just expose metrics, if you want to assign/mount/whatever that path in your selenium agents, you have to do in your manifest, KEDA doesn't patch them anyhow. I feel that I'm missing something

As it is necessary to associate the /dev/kvm device to the pod so that it can be possible to run a virtual machine inside the container, what procedure would you recommend for such a configuration?

@JorTurFer
Copy link
Member

No no, I'm not saying that the way isn't that, I'm just saying that KEDA doesn't manage it. KEDA just scaler the workload you want, but you need to define it by yourself, you can define your Deployment with that association in it's needed, and then deploy a ScaledObject to scale that Deployment, KEDA will generate an HPA and your Deployment will be scaled, but KEDA doesn't know anything about the associations of your deployment. I mean, KEDA won't access to the node and do anything, KEDA just generates the HPA and the metrics for that HPA

@JorTurFer
Copy link
Member

WRT adding the parameter, it's totally feasible, if that parameter can be used for filtering we can introduce it :)
Are you willing to contribute with it?

@gifflet
Copy link
Contributor Author

gifflet commented Dec 23, 2022

No no, I'm not saying that the way isn't that, I'm just saying that KEDA doesn't manage it. KEDA just scaler the workload you want, but you need to define it by yourself, you can define your Deployment with that association in it's needed, and then deploy a ScaledObject to scale that Deployment, KEDA will generate an HPA and your Deployment will be scaled, but KEDA doesn't know anything about the associations of your deployment. I mean, KEDA won't access to the node and do anything, KEDA just generates the HPA and the metrics for that HPA

Ok, I understand.

Are you willing to contribute with it?

Yes, I intend to be contributing to this in the future. I won't start right away because this activity is not a priority at the moment and therefore I ask you to keep this issue open.

@gifflet gifflet changed the title Add 'platformName' to selenium-grid scaler metadata structure and support to assign /dev/kvm linux device to spawned pods Add 'platformName' to selenium-grid scaler metadata structure Dec 23, 2022
@JorTurFer JorTurFer added the stale-bot-ignore All issues that should not be automatically closed by our stale bot label Dec 23, 2022
@gifflet
Copy link
Contributor Author

gifflet commented Jan 13, 2023

Selenium grid scaler updated in #4105 and docs in kedacore/keda-docs#1039

@gifflet
Copy link
Contributor Author

gifflet commented Jan 16, 2023

Can this issue be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request All issues for new features that have not been committed to needs-discussion stale-bot-ignore All issues that should not be automatically closed by our stale bot
Projects
Archived in project
Development

No branches or pull requests

3 participants