kind: Service
apiVersion: v1
metadata:
  name: "{{ .Release.Name }}-{{ .Values.elwin.name }}"
  labels:
    app: "{{ .Release.Name }}-{{ .Values.elwin.name }}"
    env: "{{ .Values.environment }}"
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/path: /metrics
    service.beta.kubernetes.io/aws-load-balancer: 0.0.0.0/0
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
spec:
  type: LoadBalancer
  ports:
  - name: json
    port: 80
    protocol: TCP
    targetPort: 8080
  - name: metrics
    port: 8081
    protocol: TCP
  selector:
    run: "{{ .Release.Name }}-{{ .Values.elwin.name }}"
    env: "{{ .Values.environment }}"
