forked from SeleniumHQ/docker-selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmonitoring-exporter-service.yaml
More file actions
39 lines (39 loc) · 1.83 KB
/
monitoring-exporter-service.yaml
File metadata and controls
39 lines (39 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{{- if eq (include "seleniumGrid.monitoring.enabled" $) "true" }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
{{- include "seleniumGrid.commonLabels" $ | nindent 4 }}
spec:
selector:
app: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
app.kubernetes.io/name: {{ template "seleniumGrid.monitoring.exporter.fullname" $ }}
type: {{ .Values.monitoring.exporter.service.type }}
{{- if and (eq .Values.monitoring.exporter.service.type "ClusterIP") ( .Values.monitoring.exporter.service.clusterIP ) }}
clusterIP: {{ .Values.monitoring.exporter.service.clusterIP }}
{{- end }}
{{- if and (eq .Values.monitoring.exporter.service.type "ExternalName") ( .Values.monitoring.exporter.service.externalName ) }}
externalName: {{ .Values.monitoring.exporter.service.externalName }}
{{- end }}
{{- if and (eq .Values.monitoring.exporter.service.type "LoadBalancer") ( .Values.monitoring.exporter.service.loadBalancerIP ) }}
loadBalancerIP: {{ .Values.monitoring.exporter.service.loadBalancerIP }}
{{- end }}
ports:
- name: http-port
protocol: TCP
port: {{ .Values.monitoring.exporter.port }}
targetPort: metrics
{{- if and (eq .Values.monitoring.exporter.service.type "NodePort") .Values.monitoring.exporter.service.nodePort }}
nodePort: {{ .Values.monitoring.exporter.service.nodePort }}
{{- end }}
{{- with .Values.monitoring.exporter.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- with .Values.monitoring.exporter.service.sessionAffinity }}
sessionAffinity: {{ . }}
{{- end }}
{{- end }}