--- apiVersion: v1 kind: Service metadata: name: "{{ .Values.name }}-service" namespace: {{ .Values.namespace }} spec: selector: app: {{ .Values.name }} {{- if eq .Values.service.type "LoadBalancer" }} type: LoadBalancer {{- else if eq .Values.service.type "NodePort" }} type: NodePort {{- end }} ports: - targetPort: 5055 protocol: TCP {{- if eq .Values.service.type "NodePort" }} nodePort: {{ .Values.service.nodePort }} {{- else if eq .Values.service.type "LoadBalancer" }} port: {{ .Values.service.port }} {{- end }}