{{- $name := include "webstatus.fullname" . -}}
{{- $identity := include "url-of" (list .Values.app.ingress.entries.identity .) -}}
{{- $webshoppingapigw := include "url-of" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
{{- $mvc := include "url-of" (list .Values.app.ingress.entries.mvc .) -}}
{{- $mongo := include "mongo-name" . -}}

apiVersion: v1
kind: ConfigMap
metadata:
  name: "cfg-{{ $name }}"
  labels:
    app: {{ template "webstatus.name" . }}
    chart: {{ template "webstatus.chart" .}}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
data:
  all__InstrumentationKey: "{{ .Values.inf.appinsights.key }}"
  all__UseAzureServiceBus: "{{ .Values.inf.eventbus.useAzure }}"
  webstatus__keystore: {{ .Values.inf.redis.keystore.constr }}
  name__mvc__hc: WebMVC HTTP Check
  internalurls__mvc__hc: http://{{ .Values.app.svc.mvc }}/hc
  name__spa__hc: WebSPA HTTP Check
  internalurls__spa__hc: http://{{ .Values.app.svc.spa }}/hc
  name__apigwws__hc: Web Shopping API GW HTTP Check
  internalurls__apigwws__hc: http://{{ .Values.app.svc.webshoppingapigw }}:8001/ready
  name__apigwms__hc: Mobile Shopping API GW HTTP Check
  internalurls__apigwms__hc: http://{{ .Values.app.svc.mobileshoppingapigw }}:8001/ready
  name__apigwwsagg__hc: Web Shopping Aggregator GW HTTP Check
  internalurls__apigwwsagg__hc: http://{{ .Values.app.svc.webshoppingagg }}/hc
  name__apigwmsagg__hc: Mobile Shopping Aggregator HTTP Check
  internalurls__apigwmsagg__hc: http://{{ .Values.app.svc.mobileshoppingagg }}/hc
  name__ordering__hc: Ordering HTTP Check
  internalurls__ordering__hc: http://{{ .Values.app.svc.ordering }}/hc
  name__orderingbackground__hc: Ordering HTTP Background Check
  internalurls__orderingbackground__hc: http://{{ .Values.app.svc.orderingbackgroundtasks }}/hc
  name__basket__hc: Basket HTTP Check
  internalurls__basket__hc: http://{{ .Values.app.svc.basket }}/hc
  name__catalog__hc: Catalog HTTP Check
  internalurls__catalog__hc: http://{{ .Values.app.svc.catalog }}/hc
  name__identity__hc: Identity HTTP Check
  internalurls__identity__hc: http://{{ .Values.app.svc.identity }}/hc
  name__payment__hc: Payment HTTP Check
  internalurls__payment__hc: http://{{ .Values.app.svc.payment }}/hc
  name__signalrhub__hc: Ordering SignalR Hub HTTP Check
  internalurls__signalrhub__hc: http://{{ .Values.app.svc.orderingsignalrhub }}/hc
