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