-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ingress resource, use ClusterIP by default
Set ClusterIP service type for Hub and Router components, NodePort could be set explicitly, but the default is ClusterIP. Add enabled by default ingress resource, which exposes either Hub or Router service. In the case of LoadBalancer or NodePort set explicitly, you shall turn off ingress explicitly as well. To turn off: --set ingress.enabled=false End-user shall supply the hostname for the ingress. There is an option to use an empty host instead. Be aware of the consequences of accepting traffic from all hosts. Fixes #1546
- Loading branch information
1 parent
745d65e
commit 511898a
Showing
6 changed files
with
118 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
name: selenium-grid | ||
description: A Helm chart for creating a Selenium grid server in Kubernetes | ||
type: application | ||
version: 0.4.0 | ||
appVersion: 4.1.4-20220427 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- if .Values.ingress.enabled }} | ||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} | ||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} | ||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: selenium-ingress | ||
labels: | ||
{{- include "seleniumGrid.commonLabels" . | nindent 4 }} | ||
{{- with .Values.customLabels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.ingress.className }} | ||
{{- end }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- if $.Values.ingress.hostname }} | ||
- host: {{ .Values.ingress.hostname }} | ||
http: | ||
{{- else }} | ||
- http: | ||
{{- end }} | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
{{- if $.Values.isolateComponents }} | ||
name: {{ template "seleniumGrid.router.fullname" $ }} | ||
port: | ||
number: {{ $.Values.components.router.port }} | ||
{{- else }} | ||
name: {{ template "seleniumGrid.hub.fullname" $ }} | ||
port: | ||
number: {{ $.Values.hub.port }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters