badhri85 | 4c028b3 | 2021-11-03 18:24:05 -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 | - name: config-port |
| 26 | port: {{ .Values.config.pcrf.configPort.port }} |
| 27 | protocol: TCP |
| 28 | --- |
| 29 | apiVersion: v1 |
| 30 | kind: Service |
| 31 | metadata: |
| 32 | name: pcrf-headless |
| 33 | labels: |
| 34 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 35 | spec: |
| 36 | selector: |
| 37 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 38 | clusterIP: None |
| 39 | ports: |
| 40 | - name: gx |
| 41 | port: 3868 |
| 42 | protocol: TCP |
| 43 | - name: prometheus-exporter |
| 44 | port: {{ .Values.config.pcrf.prometheus.port }} |
| 45 | protocol: TCP |
| 46 | - name: config-port |
| 47 | port: {{ .Values.config.pcrf.configPort.port }} |
| 48 | protocol: TCP |
| 49 | {{- if or (.Values.config.pcrf.prometheus.nodePort.enabled) (.Values.config.pcrf.gx.nodePort.enabled) }} |
| 50 | --- |
| 51 | apiVersion: v1 |
| 52 | kind: Service |
| 53 | metadata: |
| 54 | name: pcrf-external |
| 55 | labels: |
| 56 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 57 | spec: |
| 58 | selector: |
| 59 | {{ tuple "pcrf" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 60 | type: NodePort |
| 61 | ports: |
| 62 | {{- if .Values.config.pcrf.prometheus.nodePort.enabled }} |
| 63 | - name: prometheus-exporter |
| 64 | port: {{ .Values.config.pcrf.prometheus.port }} |
| 65 | protocol: TCP |
| 66 | nodePort: {{ .Values.config.pcrf.prometheus.nodePort.port }} |
| 67 | {{- end }} |
| 68 | {{- if .Values.config.pcrf.gx.nodePort.enabled }} |
| 69 | - name: gx |
| 70 | port: 3868 |
| 71 | protocol: TCP |
| 72 | nodePort: {{ .Values.config.pcrf.gx.nodePort.port }} |
| 73 | {{- end }} |
| 74 | {{- if .Values.config.pcrf.configPort.nodePort.enabled }} |
| 75 | - name: config-port |
| 76 | port: {{ .Values.config.pcrf.configPort.port }} |
| 77 | protocol: TCP |
| 78 | nodePort: {{ .Values.config.pcrf.configPort.nodePort.port }} |
| 79 | {{- end }} |
| 80 | {{- end }} |
| 81 | {{- end }} |