blob: 0bda66594f9101534b4837d16a8b823211333671 [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:
Hyunsun Moon07a193c2022-03-25 16:21:04 -060016 type: {{ .Values.config.config4g.serviceType }}
17{{- if .Values.config.config4g.externalIP }}
18 externalIPs:
19 - {{ .Values.config.config4g.externalIP }}
badhri854c028b32021-11-03 18:24:05 -050020{{- end }}
Hyunsun Moon07a193c2022-03-25 16:21:04 -060021{{- if eq .Values.config.config4g.serviceType "LoadBalancer" }}
22{{- if .Values.config.config4g.loadBalancerIP }}
23 loadBalancerIP: {{ .Values.config.config4g.loadBalancerIP }}
24{{- end }}
25{{- end }}
26 selector:
27{{ tuple "config4g" . | include "omec-control-plane.metadata_labels" | indent 4 }}
28 ports:
29 - name: prometheus-exporter
30 port: {{ .Values.config.config4g.prometheus.port }}
31 protocol: TCP
32{{- if eq .Values.config.config4g.serviceType "NodePort" }}
33{{- if .Values.config.config4g.prometheus.nodePort }}
34 nodePort: {{ .Values.config.config4g.prometheus.nodePort }}
35{{- end }}
36{{- end }}
badhri854c028b32021-11-03 18:24:05 -050037 - name: urlport-http
38 port: {{ .Values.config.config4g.urlport.port }}
39 protocol: TCP
Hyunsun Moon07a193c2022-03-25 16:21:04 -060040{{- if eq .Values.config.config4g.serviceType "NodePort" }}
41{{- if .Values.config.config4g.urlport.nodePort }}
42 nodePort: {{ .Values.config.config4g.urlport.nodePort }}
badhri854c028b32021-11-03 18:24:05 -050043{{- end }}
44{{- end }}
45{{- end }}