apiVersion: apps/v1
kind: Deployment
metadata:
  name: istio-vsvc-host
spec:
  replicas: 1
  selector:
    matchLabels:
      app: istio-vsvc-host
  template:
    metadata:
      labels:
        app: istio-vsvc-host
    spec:
      serviceAccountName: istio-vsvc-host-sa
      containers:
      - name: app
        image: tatchnicolas/istio-vsvc-host:0.5
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
        volumeMounts:
        - name: tls
          mountPath: /tls
        command: ["gunicorn"]
        args: 
        - "main:app"
        - "--bind"
        - "0.0.0.0:8080"
        - "--access-logfile"
        - "-"
        - "--certfile"
        - "/tls/tls.crt"
        - "--keyfile"
        - "/tls/tls.key"
      volumes:
      - name: tls
        secret:
          secretName: istio-vsvc-host
