apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: servicegraph
  labels:
    app: {{ template "servicegraph.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        app: servicegraph
      annotations:
        sidecar.istio.io/inject: "false"
    spec:
      containers:
        - name: servicegraph
          image: "{{ .Values.global.hub }}/servicegraph:{{ .Values.global.tag }}"
          imagePullPolicy: {{ .Values.imagePullPolicy }}
          ports:
            - containerPort: {{ .Values.service.internalPort }}
          args:
          - --prometheusAddr=http://prometheus:9090
#          livenessProbe:
#            httpGet:
#              path: /
#              port: {{ .Values.service.internalPort }}
#          readinessProbe:
#            httpGet:
#              path: /
#              port: {{ .Values.service.internalPort }}
          resources:
{{ toYaml .Values.resources | indent 12 }}
    {{- if .Values.nodeSelector }}
      nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
    {{- end }}
