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 docs for specifying Selenium Grid URL securely #959

Merged
merged 2 commits into from
Oct 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion content/docs/2.9/scalers/selenium-grid-scaler.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The below is an example trigger configuration for chrome node.
triggers:
- type: selenium-grid
metadata:
url: 'http://selenium-hub:4444/graphql' # Required
url: 'http://selenium-hub:4444/graphql' # Required. Can be ommitted if specified via TriggerAuthentication/ClusterTriggerAuthentication.
browserName: 'chrome' # Required
browserVersion: '91.0' # Optional. Only required when supporting multiple versions of browser in your Selenium Grid.
unsafeSsl : 'true' # Optional
Expand Down Expand Up @@ -143,3 +143,49 @@ spec:
browserName: 'chrome'
browserVersion: '90.0'
```

### Authentication Parameters

It is possible to specify the Graphql url of your Selenium Grid using authentication parameters. This useful if you have enabled Selenium Grid's Basic HTTP Authentication and would like to keep your credentials secure.

- `url` - Graphql url of your Selenium Grid. Refer to the Selenium Grid's documentation [here](https://www.selenium.dev/documentation/en/grid/grid_4/graphql_support/) for more info.

```yaml
apiVersion: v1
kind: Secret
metadata:
name: selenium-grid-secret
namespace: keda
type: Opaque
data:
graphql-url: base64 encoded value of GraphQL URL
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-trigger-auth-selenium-grid-secret
namespace: keda
spec:
secretTargetRef:
- parameter: url
name: selenium-grid-secret
key: graphql-url
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: selenium-grid-chrome-scaledobject
namespace: keda
labels:
deploymentName: selenium-chrome-node
spec:
maxReplicaCount: 8
scaleTargetRef:
name: selenium-chrome-node
triggers:
- type: selenium-grid
metadata:
browserName: 'chrome'
authenticationRef:
name: keda-trigger-auth-selenium-grid-secret
```