apiVersion: apps/v1
kind: Deployment
metadata:
  name: frontend-2
  labels:
    app: frontend-2
spec:
  selector:
    matchLabels:
      app: frontend-2
  template:
    metadata:
      labels:
        app: frontend-2
    spec:
      containers:
      - name: envoy
        image: envoyproxy/envoy-alpine:v1.14.1
        imagePullPolicy: Always
        args: ["-l", "debug", "--local-address-ip-version", "v4", "-c", "/run/envoy/envoy.yaml", "--base-id", "2"]
        volumeMounts:
        - name: envoy-config
          mountPath: "/run/envoy"
          readOnly: true 
        - name: spire-agent-socket
          mountPath: /run/spire/sockets
          readOnly: true          
      - name: frontend-2
        imagePullPolicy: IfNotPresent
        image: us.gcr.io/scytale-registry/symbank-webapp@sha256:a1c9b1d14e14bd1a4e75698a4f153680d2a08e6f8d1f2d7110bff63d39228a75
        command: ["/opt/symbank-webapp/symbank-webapp", "-config", "/run/symbank-webapp/config/symbank-webapp-2.conf"]
        ports:
        - containerPort: 3002
        volumeMounts:
        - name: symbank-webapp-2-config
          mountPath: /run/symbank-webapp/config
      volumes:
      - name: envoy-config
        configMap:
          name: frontend-2-envoy
      - name: spire-agent-socket
        hostPath:
          path: /run/spire/sockets
          type: DirectoryOrCreate
      - name: symbank-webapp-2-config
        configMap:
          name: symbank-webapp-2-config