apiVersion: apps/v1
kind: Deployment
metadata:
  name: envoy
  labels:
    app: envoy
spec:
  selector:
    matchLabels:
      app: envoy
  template:
    metadata:
      labels:
        app: envoy
    spec:
      containers:
        - name: envoy
          image: envoy
          imagePullPolicy: Never
          ports:
            - containerPort: 80
              hostPort: 80
            - containerPort: 443
              hostPort: 443
          volumeMounts:
            - mountPath: /etc/envoy
              name: envoy-config
            - mountPath: /run/secrets/certs/
              name: envoy-certs
              readOnly: true
          command: ["/bin/sh"]
          args:
          - "-c"
          - "restarter --command envoy --watch /run/secrets/certs/ -- -c /etc/envoy/envoy.yaml --service-cluster mycluster --service-node envoy --log-level info"
      volumes:
        - name: envoy-config
          configMap:
            name: envoy-config
        - name: envoy-certs
          secret:
            secretName: envoy-certs
