Skip to content

Commit

Permalink
[helm] add support of loadBalancerIP for hub and router services
Browse files Browse the repository at this point in the history
  • Loading branch information
DANic-git committed Jul 3, 2022
1 parent e35f3aa commit 032cce8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ You can configure the Selenium Hub with this values:
| `hub.extraEnvFrom` | `nil` | Custom environment variables for selenium taken from `configMap` or `secret`-hub |
| `hub.resources` | `{}` | Resources for selenium-hub container |
| `hub.serviceType` | `NodePort` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) |
| `hub.loadBalancerIP` | `nil` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| `hub.serviceAnnotations` | `{}` | Custom annotations for Selenium Hub service |


Expand All @@ -179,6 +180,7 @@ If you implement selenium-grid with separate components (`isolateComponents: tru
| `components.router.readinessProbe` | `See values.yaml` | Readiness probe settings |
| `components.router.resources` | `{}` | Resources for router container |
| `components.router.serviceType` | `NodePort` | Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) |
| `components.router.loadBalancerIP` | `nil` | Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) |
| `components.router.serviceAnnotations` | `{}` | Custom annotations for router service |
| `components.router.tolerations` | `[]` | Tolerations for router pods |
| `components.router.nodeSelector` | `{}` | Node Selector for router pods |
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/hub-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ spec:
selector:
app: selenium-hub
type: {{ .Values.hub.serviceType }}
{{- if and (eq .Values.hub.serviceType "LoadBalancer") ( .Values.hub.loadBalancerIP ) }}
loadBalancerIP: {{ .Values.hub.loadBalancerIP }}
{{- end }}
ports:
- name: http-hub
protocol: TCP
Expand Down
3 changes: 3 additions & 0 deletions charts/selenium-grid/templates/router-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ spec:
selector:
app: selenium-router
type: {{ .Values.components.router.serviceType }}
{{- if and (eq .Values.components.router.serviceType "LoadBalancer") (.Values.components.router.loadBalancerIP) }}
loadBalancerIP: {{ .Values.components.router.loadBalancerIP }}
{{- end }}
ports:
- name: tcp-router
protocol: TCP
Expand Down
4 changes: 4 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ components:
resources: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
loadBalancerIP: ""
# Custom annotations for router service
serviceAnnotations: {}
# Tolerations for router pods
Expand Down Expand Up @@ -253,6 +255,8 @@ hub:
resources: {}
# Kubernetes service type (see https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types)
serviceType: ClusterIP
# Set specific loadBalancerIP when serviceType is LoadBalancer (see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer)
loadBalancerIP: ""
# Custom annotations for Selenium Hub service
serviceAnnotations: {}
# Tolerations for selenium-hub pods
Expand Down

0 comments on commit 032cce8

Please sign in to comment.