apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-api
  labels:
    app: auth-api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth-api
  template:
    metadata:
      labels:
        app: auth-api
    spec:
      containers:
      - name: auth-api
        image: mihirshah99/auth:latest
        env:
        - name: AUTH_API_PORT
          valueFrom:
            configMapKeyRef:
              name: auth-api
              key: AUTH_API_PORT
        - name: USERS_API_ADDRESS
          valueFrom:
            configMapKeyRef:
              name: auth-api
              key: USERS_API_ADDRESS
        - name: JWT_SECRET
          valueFrom:
            secretKeyRef:
              name: auth-api
              key: JWT_SECRET
        ports:
        - containerPort: 8081