---
kind: Service
apiVersion: v1
metadata:
  name: "${K8S_NAME}"
  namespace: "${K8S_NAMESPACE}"
  labels:
    app: "${K8S_APP}"
    component: "${K8S_NAME}"
    tier: "${K8S_TIER}"
    environment: "${APP_ENV}"
  annotations:
    prometheus.io/path: /metrics
    prometheus.io/port: "$APP_PORT"
    prometheus.io/scheme: http
    prometheus.io/scrape: "true"
spec:
  ports:
  - port: 80
    targetPort: ${K8S_PORT}
  selector:
    app: "${K8S_APP}"
    component: "${K8S_NAME}"
    tier: "${K8S_TIER}"
    environment: "${APP_ENV}"
