---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-backend-super
spec:
  selector:
    matchLabels:
      app: app-backend-super
  replicas: 2
  template:
    metadata:
      labels:
        app: app-backend-super
    spec:
      containers:
        - name: app-backend-super
          image: app-backend:1.0.0-SNAPSHOT
          imagePullPolicy: Never
          env:
            - name: POD_IP
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: status.podIP
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: metadata.name
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  apiVersion: v1
                  fieldPath: spec.nodeName
            - name: FRONTEND_HOSTNAME
              value: "app-frontend-grpc-lb.default.svc.cluster.local"
            - name: FRONTEND_PORT
              value: "5556"
            - name: CAPABILITY
              value: "super"
          ports:
            - name: grpc
              containerPort: 5555
          resources:
            limits:
              memory: 512Mi
              cpu: 1000m
            requests:
              memory: 256Mi
              cpu: 500m
