Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [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.pcrf.deploy }} |
| 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: pcrf |
| 13 | labels: |
| 14 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 15 | spec: |
| 16 | selector: |
| 17 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 18 | ports: |
| 19 | - name: gx |
| 20 | port: 3868 |
| 21 | protocol: TCP |
| 22 | - name: prometheus-exporter |
| 23 | port: {{ .Values.config.pcrf.prometheus.port }} |
| 24 | protocol: TCP |
| 25 | --- |
| 26 | apiVersion: v1 |
| 27 | kind: Service |
| 28 | metadata: |
| 29 | name: pcrf-headless |
| 30 | labels: |
| 31 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 32 | spec: |
| 33 | selector: |
| 34 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 35 | clusterIP: None |
| 36 | ports: |
| 37 | - name: gx |
| 38 | port: 3868 |
| 39 | protocol: TCP |
Ajay Lotan Thakur | cd372a2 | 2020-12-11 14:36:26 -0700 | [diff] [blame] | 40 | - name: prometheus-exporter |
| 41 | port: {{ .Values.config.pcrf.prometheus.port }} |
| 42 | protocol: TCP |
| 43 | |
Ajay Lotan Thakur | c3cd619 | 2020-10-12 20:12:38 -0500 | [diff] [blame] | 44 | --- |
| 45 | {{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }} |
| 46 | apiVersion: v1 |
| 47 | kind: Service |
| 48 | metadata: |
| 49 | name: pcrf-external |
| 50 | labels: |
| 51 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 52 | spec: |
| 53 | selector: |
| 54 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 55 | type: NodePort |
| 56 | ports: |
| 57 | {{- if .Values.config.pcrf.prometheus.nodePort.enabled }} |
| 58 | - name: prometheus-exporter |
| 59 | port: {{ .Values.config.pcrf.prometheus.port }} |
| 60 | protocol: TCP |
| 61 | nodePort: {{ .Values.config.pcrf.prometheus.nodePort.port }} |
| 62 | {{- end }} |
| 63 | {{- if .Values.config.pcrf.gx.nodePort.enabled }} |
| 64 | - name: gx |
| 65 | port: 3868 |
| 66 | protocol: TCP |
| 67 | nodePort: {{ .Values.config.pcrf.gx.nodePort.port }} |
| 68 | {{- end }} |
| 69 | {{- end }} |
| 70 | {{- end }} |