You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/selenium-grid/README.md
+128-44
Original file line number
Diff line number
Diff line change
@@ -31,9 +31,11 @@ This chart enables the creation of a Selenium Grid Server in Kubernetes.
31
31
*[Configuration of video recorder and video uploader](#configuration-of-video-recorder-and-video-uploader)
32
32
*[Video recorder](#video-recorder)
33
33
*[Video uploader](#video-uploader)
34
-
*[Configuration of Secure Communication (HTTPS)](#configuration-of-secure-communication-https)
35
-
*[Secure Communication](#secure-communication)
36
-
*[Node Registration](#node-registration)
34
+
*[Configuration of Secure Communication](#configuration-of-secure-communication)
35
+
*[Create TLS Secret](#create-tls-secret)
36
+
*[Secure Connection to Selenium Grid components](#secure-connection-to-selenium-grid-components)
37
+
*[Secure Connection to the Ingress proxy](#secure-connection-to-the-ingress-proxy)
38
+
*[Node Registration](#node-registration)
37
39
*[Configuration of tracing observability](#configuration-of-tracing-observability)
38
40
*[Configuration of Selenium Grid chart](#configuration-of-selenium-grid-chart)
39
41
*[Configuration of KEDA](#configuration-of-keda)
@@ -600,76 +602,158 @@ videoRecorder:
600
602
imageTag: latest
601
603
```
602
604
603
-
### Configuration of Secure Communication (HTTPS)
605
+
### Configuration of Secure Communication
604
606
605
607
Selenium Grid supports secure communication between components. Refer to the [instructions](https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/grid/commands/security.txt) and [options](https://www.selenium.dev/documentation/grid/configuration/cli_options/#server) are able to configure the secure communication. Below is the details on how to enable secure communication in Selenium Grid chart.
606
608
607
-
#### Secure Communication
609
+
In the chart, there is directory [certs](./certs) contains the default self-signed certificate, private key (as PKCS8 format), and Java Keystore (JKS) to teach Java about secure connection (since we are using a non-standard CA) for your trial, local testing purpose. You can generate your own self-signed certificate put them in that default directory by using script [certs/cert.sh](./certs/cert.sh) with adjust needed information. The certificate, private key, truststore are mounted to the components via `Secret`.
608
610
609
-
In the chart, there is directory [certs](./certs) contains the default certificate, private key (as PKCS8 format), and Java Keystore (JKS) to teach Java about secure connection (since we are using a non-standard CA) for your trial, local testing purpose. You can generate your own self-signed certificate put them in that default directory by using script [cert.sh](./certs/cert.sh) with adjust needed information. The certificate, private key, truststore are mounted to the components via `Secret`.
611
+
Usage of [certs/cert.sh](./certs/cert.sh) script:
610
612
611
-
There are multiple ways to configure your certificate, private key, truststore to the components. You can choose one of them or combine them.
- Use the default directory [certs](./certs). Rename your own files to be same as the default files and replace them. Give `--set tls.enabled=true` to enable secure communication.
624
+
#### Create TLS Secret
614
625
615
-
- Use the default directory [certs](./certs). Copy your own files to there and adjust the file name under config `tls.defaultFile`, those will be picked up when installing chart. For example:
626
+
There are multiple ways to insert your certificate, private key, truststore to the components. You can choose one of following ways:
616
627
617
-
```yaml
618
-
tls:
619
-
enabled: true
620
-
trustStorePassword: "your_truststore_password"
621
-
defaultFile:
622
-
certificate: "certs/your_cert.pem"
623
-
privateKey: "certs/your_private_key.pkcs8"
624
-
trustStore: "certs/your_truststore.jks"
628
+
1. Replace your certificate, private key, truststore to the default directory [certs](./certs) in chart with the same name before deploying the chart.
629
+
630
+
2. Use Helm CLI to pass your certificate, private key, truststore via `--set-file` when deploying the chart. For example (replace `$RELEASENAME` and `$NAMESPACE` with your values):
For some security reasons, you may not able to put private key in your source code or your customization chart package. You can provide files with contents are encoded in Base64 format, just append `.base64` to the file name for chart able to know and decode them. For example:
639
+
640
+
3. Create your own TLS Secret with your certificate, private key, truststore and pass the Secret name via `tls.nameOverride` when deploying the chart. For example (replace `$RELEASENAME` and `$NAMESPACE` with your values):
641
+
642
+
```bash
643
+
# Steps to prepare your self-signed certificate
644
+
./certs/cert.sh -d /path/to/your/
645
+
# Create TLS Secret with your certificate, private key, truststore
In case your external secret contains key file names are different with default, you can instruct server to use them via following values:
627
656
628
657
```yaml
629
658
tls:
630
659
enabled: true
631
-
trustStorePassword: "your_truststore_password"
632
-
defaultFile:
633
-
certificate: "certs/your_cert.pem.base64"
634
-
privateKey: "certs/your_private_key.pkcs8.base64"
635
-
trustStore: "certs/your_truststore.jks.base64"
660
+
nameOverride: my-external-tls-secret
661
+
certificateFile: "my-tls.crt"
662
+
privateKeyFile: "my-tls.key"
663
+
trustStoreFile: "my-server.jks"
664
+
trustStorePassword: "mytruststorepassword"
636
665
```
637
666
638
-
- Using Helm CLI `--set-file` to pass your own file to particular config key. For example:
667
+
#### Secure Connection to Selenium Grid components
639
668
640
-
```bash
641
-
helm upgrade -i test selenium-grid \
669
+
When enabling secure communication between Selenium Grid server components, you need to set the following values:
670
+
671
+
```yaml
672
+
tls:
673
+
enabled: true
674
+
```
675
+
676
+
In additional, if the ingress is enabled with `ingress.hostname` is set, the default server TLS secret is also used for hosts TLS secretName when `ingress.tls` is empty. Once you specify `ingress.tls`, the default server TLS secret is no longer used for hosts TLS secretName.
677
+
678
+
Moreover, when sub-chart `ingress-nginx` is enabled, the default server TLS secret can also be assigned via `ingress-nginx.controller.extraArgs.default-ssl-certificate`. For example (replace `$RELEASENAME` and `$NAMESPACE` with your values):
Below is an example of Grid UI accessible via NodePort with secure connection, and using external TLS Secret (replace `$RELEASENAME` and `$NAMESPACE` with your values):
Grid UI can be accessed via HTTPS address `https://your.host.public.ip:30444`.
648
699
649
-
If you start NGINX ingress controller inline with Selenium Grid chart, you can configure the default certificate of NGINX ingress controller to use the same certificate as Selenium Grid. For example:
700
+
#### Secure Connection to the Ingress proxy
701
+
702
+
When enabling secure communication via HTTPS/TLS between the client and the Ingress proxy only. The proxy will terminate the TLS connection and forward the request to the backend components via an unencrypted HTTP connection. The backend Selenium Grid components doesn't need to understand HTTPS. To enable this mode, you need to set the following values:
In additional, a self-signed certificate and private key can be generated runtime during the chart deployment for Ingress TLS by setting these values:
711
+
712
+
```yaml
713
+
tls:
714
+
ingress:
715
+
generateTLS: true
716
+
defaultName: "MySelfSignedCert"
717
+
defaultDays: 3650
718
+
defaultCN: "www.domain.com" # Common Name
719
+
defaultSANList:
720
+
- selenium-grid.prod.domain.com # Subject Alternative Name
721
+
- selenium-grid.staging.domain.com
722
+
defaultIPList:
723
+
- 10.87.99.100 # Public IP of the host running K8s or LoadBalancer IP
724
+
- 10.87.100.101
660
725
```
661
726
662
-
#### Node Registration
727
+
You can get the `tls.crt` and `tls.key` from the Secret after the chart is deployed. For example (replace `$RELEASENAME` and `$NAMESPACE` with your values):
Below is an example of Grid UI accessible via secure connection to the Ingress proxy with self-signed certificate in external TLS Secret (replace `$RELEASENAME` and `$NAMESPACE` with your values):
Grid UI can be accessed via HTTPS address `https://selenium-grid.prod.domain.com`.
747
+
748
+
### Node Registration
663
749
664
750
To enable secure in the node registration to make sure that the node is one you control and not a rouge node, you can enable and provide a registration secret string to Distributor, Router and
665
-
Node servers in config `tls.registrationSecret`. For example:
751
+
Node servers in config `registrationSecret`. For example:
0 commit comments