apiVersion: apps/v1
kind: Deployment
metadata:
  name: payments-depl
  labels:
    type: stage-depl
    svcname: payment-svc
    version: v1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: payments
      version: v1
  template:
    metadata:
      labels:
        app: payments
        version: v1
    spec:
      serviceAccountName: glotixz-paymentsrv
      containers:
        - name: payments
          image: quay.io/ultimatestack/payment-svc:v1.2-beta
          imagePullPolicy: Always
          ports:
            - containerPort: 4004
          env:
            - name: NATS_CLIENT_ID
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: NATS_URL
              value: 'http://nats-srv:4222'
            - name: NATS_CLUSTER_ID
              value: ticketing
            - name: PAYMENTS_MONGO_DB_URI
              value: 'mongodb://paymentdb-sts-srv:27017/payments'
            - name: JWTSECRET
              valueFrom:
                secretKeyRef:
                  name: jwt-secret
                  key: JWT_KEY
            - name: STRIPE_KEY
              valueFrom:
                secretKeyRef:
                  name: stripe-secret
                  key: STRIPE_KEY
          envFrom:
            - configMapRef:
                name: host-config                  