{{- if .Values.meshService.enabled }} apiVersion: v1 kind: Service metadata: name: {{ .Release.Name }}-mesh labels: app.kubernetes.io/name: {{ .Chart.Name }} app.kubernetes.io/instance: {{ .Release.Name }} {{- with .Values.meshService.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: type: {{ .Values.meshService.type }} selector: app: {{ .Release.Name }} ports: - name: http port: {{ .Values.httpPort }} targetPort: http protocol: TCP {{- end }}