blob: 8d426b4ea8f4f78ee9b12e4e5d88060273b12d06 [file] [log] [blame]
badhri854c028b32021-11-03 18:24:05 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
Ajay Lotan Thakur03189d22022-02-10 14:06:03 -06004# SPDX-License-Identifier: Apache-2.0
badhri854c028b32021-11-03 18:24:05 -05005*/}}
6
7{{- if .Values.config.config4g.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: config4g
13 labels:
14{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
15spec:
16 type: ClusterIP
17 selector:
18{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: prometheus-exporter
21 port: {{ .Values.config.config4g.prometheus.port }}
22 protocol: TCP
23 - name: urlport-http
24 port: {{ .Values.config.config4g.urlport.port }}
25 protocol: TCP
26{{- if or .Values.config.config4g.urlport.nodePort.enabled .Values.config.config4g.prometheus.nodePort.enabled }}
27---
28apiVersion: v1
29kind: Service
30metadata:
31 name: config4g-external
32 labels:
33{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
34spec:
35 type: NodePort
36 selector:
37{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
38 ports:
39{{- if .Values.config.config4g.prometheus.nodePort.enabled }}
40 - name: prometheus-exporter
41 port: {{ .Values.config.config4g.prometheus.port }}
42 protocol: TCP
43 nodePort: {{ .Values.config.config4g.prometheus.nodePort.port }}
44{{- end }}
45{{- if .Values.config.config4g.urlport.nodePort.enabled }}
46 - name: urlport-http
47 port: {{ .Values.config.config4g.urlport.port }}
48 protocol: TCP
49 nodePort: {{ .Values.config.config4g.urlport.nodePort.port }}
50{{- end }}
51{{- end }}
52{{- end }}