Skip to content

Commit

Permalink
Add docs for specifying Selenium Grid URL securely (#959)
Browse files Browse the repository at this point in the history
* Add docs for specifying Selenium Grid URL securely

Signed-off-by: JD Harrington <[email protected]>

* Match standard formatting for Authentication Parameters

Signed-off-by: JD Harrington <[email protected]>

Signed-off-by: JD Harrington <[email protected]>
  • Loading branch information
psi authored Oct 18, 2022
1 parent e722739 commit c4cde3a
Showing 1 changed file with 47 additions and 1 deletion.
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
```

0 comments on commit c4cde3a

Please sign in to comment.