apiVersion: v1 kind: Service metadata: name: {{ template "canary.fullname" . }} labels: app: {{ template "canary.name" . }} chart: {{ template "canary.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} {{- if .Values.service.targetPort }} targetPort: {{ .Values.service.targetPort }} {{- end }} {{- if .Values.service.portName }} name: {{ .Values.service.portName }} {{- end }} protocol: TCP selector: {{- with required "Valid 'selectors' for the Service are required" .Values.service.selectorLabels }} {{ toYaml . }} {{- end }}