apiVersion: apps/v1
kind: Deployment
metadata:
  name: email-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: email
  template:
    metadata:
      labels:
        app: email
    spec:
      containers:
        - name: email
          image: jarrodm1234/auction-website-email
          env:
            - name: EMAIL
              valueFrom:
                secretKeyRef:
                  name: email-secret
                  key: EMAIL
            - name: EMAIL_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: email-password-secret
                  key: EMAIL_PASSWORD
            - name: NATS_URL
              value: 'http://nats-srv:4222'
            - name: NATS_CLUSTER_ID
              value: auction
            - name: NATS_CLIENT_ID
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
