Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
🚸 Allow custom name for service
Browse files Browse the repository at this point in the history
  • Loading branch information
TilBlechschmidt committed Dec 7, 2021
1 parent 00e3037 commit e6dc7b3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
A service named {{ include "web-grid.fullname" . }} has been created. Point your selenium client to it (either by running it in K8s or creating an Ingress)!
A service named {{ include "web-grid.serviceName" . }} has been created. Point your selenium client to it (either by running it in K8s or creating an Ingress)!
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ Create the name of the service account to use
{{- end }}
{{- end }}

{{/*
Create the name for the service
*/}}
{{- define "web-grid.serviceName" -}}
{{- default (include "web-grid.fullname" .) .Values.service.name }}
{{- end }}

{{/*
Allow customization of the image tag used
*/}}
Expand Down
17 changes: 0 additions & 17 deletions distribution/kubernetes/demo/charts/webgrid/templates/gangway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,3 @@ spec:
port: status
resources:
{{- toYaml .Values.resources.gangway | nindent 12 }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "web-grid.fullname" . }}
labels:
{{- include "web-grid.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
dev.webgrid/component: gangway
{{- include "web-grid.selectorLabels" . | nindent 4 }}
16 changes: 16 additions & 0 deletions distribution/kubernetes/demo/charts/webgrid/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "web-grid.serviceName" . }}
labels:
{{- include "web-grid.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
dev.webgrid/component: gangway
{{- include "web-grid.selectorLabels" . | nindent 4 }}
2 changes: 2 additions & 0 deletions distribution/kubernetes/demo/charts/webgrid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ logLevel: info,hyper=warn,warp=warn,sqlx=warn,tower=warn,h2=warn
service:
type: ClusterIP
port: 80
name: ""

config:
# When set, sessions will be provided with this backend enabling video recording.
Expand Down Expand Up @@ -79,6 +80,7 @@ config:
segmentDuration: 6

replicaCount:
api: 1
gangway: 1
manager: 1
collector: 1
Expand Down

0 comments on commit e6dc7b3

Please sign in to comment.