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