{{- if .Values.service.enabled }} apiVersion: v1 kind: Service metadata: name: {{ include "web-app.fullname" . }} labels: {{- include "web-app.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: - name: http port: {{ .Values.service.port }} targetPort: {{ .Values.containerPort }} protocol: TCP selector: {{- include "web-app.selectorLabels" . | nindent 4 }} {{- end }}