# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c) 2019 Intel Corporation
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-behind-envoy-no-qat
  labels:
    app: nginx-behind-envoy-no-qat
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx-behind-envoy-no-qat
  template:
    metadata:
      labels:
        app: nginx-behind-envoy-no-qat
    spec:
      runtimeClassName: kata-qemu
      containers:
        - name: nginx
          image: nginx:latest
        - name: envoy-sidecar
          image: localhost:5000/envoy-qat:devel
          imagePullPolicy: IfNotPresent
          command:
            - "/envoy-static"
          args:
            - "-c"
            - "/etc/envoy/config/envoy-conf.yaml"
          resources:
            limits:
              cpu: 2
          volumeMounts:
            - name: tls
              mountPath: /etc/envoy/tls
              readOnly: true
            - name: config
              mountPath: /etc/envoy/config
              readOnly: true
      volumes:
        - name: tls
          secret:
            secretName: envoy-tls-secret
        - name: config
          configMap:
            name: envoy-sidecar-config
