mirror of
https://github.com/shadoll/helm-charts.git
synced 2026-11-27 03:40:54 +00:00
31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
{{- if .Values.statusPage.enabled }}
|
|
{{- $serviceType := .Values.statusPage.service.type | default "ClusterIP" }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "monitoring-platform.fullname" . }}-status-page
|
|
labels:
|
|
{{- include "monitoring-platform.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: status-page
|
|
spec:
|
|
type: {{ $serviceType }}
|
|
ports:
|
|
- port: {{ .Values.statusPage.service.port | default .Values.statusPage.httpPort }}
|
|
targetPort: http
|
|
protocol: TCP
|
|
name: http
|
|
{{- if and (eq $serviceType "NodePort") .Values.statusPage.service.nodePort }}
|
|
nodePort: {{ .Values.statusPage.service.nodePort }}
|
|
{{- end }}
|
|
- port: {{ .Values.statusPage.metricsPort }}
|
|
targetPort: metrics
|
|
protocol: TCP
|
|
name: metrics
|
|
{{- if and (eq $serviceType "NodePort") .Values.statusPage.service.metricsNodePort }}
|
|
nodePort: {{ .Values.statusPage.service.metricsNodePort }}
|
|
{{- end }}
|
|
selector:
|
|
{{- include "monitoring-platform.selectorLabels" . | nindent 4 }}
|
|
app.kubernetes.io/component: status-page
|
|
{{- end }}
|