badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright 2019-present Open Networking Foundation |
| 3 | |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 5 | */}} |
| 6 | |
| 7 | {{- if .Values.config.hss.deploy }} |
| 8 | --- |
| 9 | apiVersion: v1 |
| 10 | kind: Service |
| 11 | metadata: |
| 12 | name: hss |
| 13 | labels: |
| 14 | {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 15 | spec: |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 16 | type: {{ .Values.config.hss.serviceType }} |
| 17 | {{- if .Values.config.hss.externalIP }} |
| 18 | externalIPs: |
| 19 | - {{ .Values.config.hss.externalIP }} |
| 20 | {{- end }} |
| 21 | {{- if eq .Values.config.hss.serviceType "LoadBalancer" }} |
| 22 | {{- if .Values.config.hss.loadBalancerIP }} |
| 23 | loadBalancerIP: {{ .Values.config.hss.loadBalancerIP }} |
| 24 | {{- end }} |
| 25 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 26 | selector: |
| 27 | {{ tuple "hss" . | include "omec-control-plane.metadata_labels" | indent 4 }} |
| 28 | ports: |
| 29 | - name: s6a |
| 30 | port: 3868 |
| 31 | protocol: TCP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 32 | {{- if eq .Values.config.hss.serviceType "NodePort" }} |
| 33 | {{- if .Values.config.hss.s6a.nodePort }} |
| 34 | nodePort: {{ .Values.config.hss.s6a.nodePort }} |
| 35 | {{- end }} |
| 36 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 37 | - name: config-port |
| 38 | port: {{ .Values.config.hss.configPort.port }} |
| 39 | protocol: TCP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 40 | {{- if eq .Values.config.hss.serviceType "NodePort" }} |
| 41 | {{- if .Values.config.hss.configPort.nodePort }} |
| 42 | nodePort: {{ .Values.config.hss.configPort.nodePort }} |
| 43 | {{- end }} |
| 44 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 45 | - name: prometheus-exporter |
| 46 | port: {{ .Values.config.hss.prometheus.port }} |
| 47 | protocol: TCP |
Hyunsun Moon | 07a193c | 2022-03-25 16:21:04 -0600 | [diff] [blame] | 48 | {{- if eq .Values.config.hss.serviceType "NodePort" }} |
| 49 | {{- if .Values.config.hss.prometheus.nodePort }} |
| 50 | nodePort: {{ .Values.config.hss.prometheus.nodePort }} |
| 51 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 52 | {{- end }} |
| 53 | {{- end }} |