| apiVersion: v1 |
| kind: Service |
| metadata: |
| name: soft-serve |
| namespace: {{ .Release.Namespace }} |
| {{ if eq .Values.serviceType "LoadBalancer" }} |
| annotations: |
| {{ if .Values.reservedIP }} |
| metallb.universe.tf/loadBalancerIPs: {{ .Values.reservedIP }} |
| {{ end }} |
| {{ if .Values.addressPool }} |
| metallb.universe.tf/address-pool: {{ .Values.addressPool }} |
| {{ end }} |
| {{ end }} |
| spec: |
| type: {{ .Values.serviceType }} |
| selector: |
| app: soft-serve |
| ports: |
| - name: ssh |
| port: {{ .Values.sshPort }} |
| protocol: TCP |
| - name: http |
| port: {{ .Values.httpPort }} |
| targetPort: http |
| protocol: TCP |