apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    kustomize.component: ambassador
  name: ambassador
  namespace: istio-system
spec:
  replicas: 1
  selector:
    matchLabels:
      kustomize.component: ambassador
  template:
    metadata:
      labels:
        kustomize.component: ambassador
        service: ambassador
    spec:
      containers:
      - env:
        - name: AMBASSADOR_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        image: quay.io/datawire/ambassador:0.37.0
        livenessProbe:
          httpGet:
            path: /ambassador/v0/check_alive
            port: 8877
          initialDelaySeconds: 30
          periodSeconds: 30
        name: ambassador
        readinessProbe:
          httpGet:
            path: /ambassador/v0/check_ready
            port: 8877
          initialDelaySeconds: 30
          periodSeconds: 30
        resources:
          limits:
            cpu: 1
            memory: 400Mi
          requests:
            cpu: 200m
            memory: 100Mi
      restartPolicy: Always
      serviceAccountName: ambassador
