apiVersion: apps/v1
kind: Deployment
metadata:
  name: sidecar-service
  labels:
    app: application
spec:
  replicas: 2
  selector:
    matchLabels:
      app: sidecar-service
  template:
    metadata:
      labels:
        app: sidecar-service
    spec:
      containers:
        - name: sidecar-app
          image: sidecar-app:v1
          imagePullPolicy: Never
          ports:
            - containerPort: 8080
          env:
            - name: port
              value: "8080"
        - name: sidecar
          image: sidecar-proxy:v1
          imagePullPolicy: Never
          ports:
            - containerPort: 80
          env:
            - name: port
              value: "80"
            - name: SRV_NAME
              value: "legacy-application"
            - name: TARGET
              value: "http://localhost:8080"
          