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

Selenium-Grid-Scaler : ScaledObject errors out when ServiceName has been used #5759

Closed
gitissuepost opened this issue May 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@gitissuepost
Copy link

gitissuepost commented May 1, 2024

Report

I have setup my Cluster in GKE. Attached are my Configs fro my cluser and selenium grid.

When I use the service name in my ScaledObject trigger, it doesn't instantiate the POD. However, if I use the ClusterIP directly, then only it works.

It should work with the service name as well unless I am missing anything. It adds the request to queue using the service name. Hence I am ruling out the connectivity issues with service name. However, it doesn't create a new node/pod that was suppossed to be spinned up by ScaledObject making the node available for execution.

Expected Behavior

Scaler should activate with service name as well

Actual Behavior

Scaler is being activated with cluster ip only. It's failing with service name

Steps to Reproduce the Problem

Follow the config below.

selenium-grid-config.txt

Logs from KEDA operator

keda-operator.log

KEDA Version

2.14.0

Kubernetes Version

1.29

Platform

Google Cloud

Scaler Details

Selenium-Grid-Scaler

Anything else?

image

Updated ScaledObject trigger config

image

@gitissuepost gitissuepost added the bug Something isn't working label May 1, 2024
@JorTurFer
Copy link
Member

Hello,
Yes, it has to work. Is your selenium-hub in the same namespace as KEDA? Despite your ScaledObject is in the same namespace as the selenium-hub, the request is done by KEDA from its own namespace, so if the hub is in other namespace, you need to include the namespace in the url (based on the file you sent):

  • from http://selenium-hub-ci:4444/graphql
  • to http://selenium-hub-ci.default:4444/graphql

@gitissuepost
Copy link
Author

gitissuepost commented May 7, 2024

@JorTurFer - Thank you for the details. It worked with the namespace. If I don't have any namespace defined (as below confirg), do I still need to consider it as default name space?

apiVersion: v1
kind: Service
metadata:
  labels:
    app: selenium-hub-ci-service
  name: selenium-hub-ci
spec:
  selector:
    app: selenium-grid-hub-pod
  type: ClusterIP
  ports:
    - name: distributor
      protocol: TCP
      port: 4444
      targetPort: 4444

    - name: subscriber
      protocol: TCP
      port: 4443
      targetPort: 4443

    - name: publisher
      protocol: TCP
      port: 4442
      targetPort: 4442

@JorTurFer
Copy link
Member

yeah, every time when you don't set the namespace, the manifests are placed on the kubectl default namespace (usually it's default but it can be changed). Inside kubernetes, I suggest including always the namespace when you call directly to services, even though you are in the same namespace

@JorTurFer
Copy link
Member

JorTurFer commented May 7, 2024

Can we close this issue? Do you have any other trouble?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants