blob: ab91f8308fbf91873ebf74d8730c9b51608d4086 [file] [log] [blame]
Ajay Lotan Thakur85e31112021-06-23 16:59:47 -05001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
6
7{{- if .Values.config.simapp.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: simapp
13 labels:
14{{ tuple "simapp" . | include "omec-sub-provision.metadata_labels" | indent 4 }}
15spec:
16 type: ClusterIP
17 selector:
18{{ tuple "simapp" . | include "omec-sub-provision.metadata_labels" | indent 4 }}
19 ports:
20 - name: prometheus-exporter
21 port: {{ .Values.config.simapp.prometheus.port }}
22 protocol: TCP
23{{- if .Values.config.simapp.prometheus.nodePort.enabled }}
24---
25apiVersion: v1
26kind: Service
27metadata:
28 name: simapp-external
29 labels:
30{{ tuple "simapp" . | include "omec-sub-provision.metadata_labels" | indent 4 }}
31spec:
32 type: NodePort
33 selector:
34{{ tuple "simapp" . | include "omec-sub-provision.metadata_labels" | indent 4 }}
35 ports:
36{{- if .Values.config.simapp.prometheus.nodePort.enabled }}
37 - name: prometheus-exporter
38 port: {{ .Values.config.simapp.prometheus.port }}
39 protocol: TCP
40 nodePort: {{ .Values.config.simapp.prometheus.nodePort.port }}
41{{- end }}
42{{- end }}
43{{- end }}