apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-deployment
  labels:
    app: app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: app
  template:
    metadata:
      labels:
        app: app
    spec:
      containers:
        - name: app
          image: app:latest
          imagePullPolicy: Never
          ports:
            - containerPort: 3000
          env:
            - name: MY_POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
          # readinessProbe:
          #   tcpSocket:
          #     port: 2999
          #   initialDelaySeconds: 5
          #   periodSeconds: 30
        - name: sidecar
          image: sidecar:latest
          imagePullPolicy: Never
          env:
            - name: MY_POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
