blob: c06af0741f6c5cdf0e06a47dde274826c9972532 [file] [log] [blame]
Badhrinath987e1d82020-11-20 13:23:58 -06001{{/*
2# Copyright 2020-present Open Networking Foundation
3
4# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
5*/}}
6
7{{- if .Values.config.ausf.deploy }}
8---
9apiVersion: v1
10kind: Service
11metadata:
12 name: ausf
13 labels:
14{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
15spec:
16 type: ClusterIP
17 selector:
18{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
19 ports:
20 - name: prometheus-exporter
21 port: {{ .Values.config.ausf.prometheus.port }}
22 protocol: TCP
23 - name: sbi
24 port: {{ .Values.config.ausf.sbi.port }}
25 protocol: TCP
26---
27apiVersion: v1
28kind: Service
29metadata:
30 name: ausf-headless
31 labels:
32{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
33spec:
34 clusterIP: None
35 selector:
36{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
37{{- if or .Values.config.ausf.prometheus.nodePort.enabled .Values.config.ausf.sbi.nodePort.enabled }}
38---
39apiVersion: v1
40kind: Service
41metadata:
42 name: ausf-external
43 labels:
44{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
45spec:
46 type: NodePort
47 selector:
48{{ tuple "ausf" . | include "5g-control-plane.metadata_labels" | indent 4 }}
49 ports:
50{{- if .Values.config.ausf.prometheus.nodePort.enabled }}
51 - name: prometheus-exporter
52 port: {{ .Values.config.ausf.prometheus.port }}
53 protocol: TCP
54 nodePort: {{ .Values.config.ausf.prometheus.nodePort.port }}
55{{- end }}
56{{- if .Values.config.ausf.sbi.nodePort.enabled }}
57 - name: sbi
58 port: {{ .Values.config.ausf.sbi.port }}
59 protocol: TCP
60 nodePort: {{ .Values.config.ausf.sbi.nodePort.port }}
61{{- end }}
62{{- end }}
63{{- end }}