kind: Deployment
apiVersion: apps/v1
metadata:
  name: app1
  namespace: http-service
  labels:
    app: app1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: app1
  template:
    metadata:
      labels:
        app: app1
    spec:
      containers:
        - name: application_name
          image: application_image
          ports:
            - name: getextractport
              containerPort: <app container port>
        - name: existing-envoy-sidecar
          image: envoy:latest
          ports:
            - containerPort: <envoy listening port>
              name: envoy-port
        ########## appsentinels: envoy container start ##############
        - name: appsentinels-envoy
          image: appsentinels/front-proxy-k8:latest
          imagePullPolicy: IfNotPresent
          securityContext:
             runAsUser: 1111
          command:
             - /entry-sidecar.sh
          args:
             - -p
             - "<front-proxy listening port, eg: 9000>"
             - -f
             - "<application listening port>"
             - -c
             - "<controller hostname>"
             - -b
             - "<unique base id, usually 1 should be fine>"
        ########## appsentinels: envoy container end ################
---
kind: Service
apiVersion: v1
metadata:
  name: app1
  namespace: http-service
spec:
  selector:
    app: app1
  ports:
  - name: http
    protocol: TCP
    port: <external port>
    targetPort: <envoy listening port>
  externalIPs:
  - 172.31.15.3
  type: NodePort
