apiVersion: apps/v1
kind: Deployment
metadata:
  name: firebase-middleware-deployment
  labels:
    app: firebase-middleware
spec:
  replicas: 1
  selector:
    matchLabels:
      app: firebase-middleware
  template:
    metadata:
      labels:
        app: firebase-middleware
    spec:
      containers:
        - name: firebase-middleware
          image: firebase-middleware:latest
          env:
            - name: GOOGLE_APPLICATION_CREDENTIALS
              value: "/app/thepro-firebase-config.json"
          ports:
            - containerPort: 8080
          volumeMounts:
            - name: config-volume
              mountPath: /app/firebase-service-account.json
      volumes:
        - name: firebase-config-volume
          secret:
            secretName: firebase-admin-config
