apiVersion: apps/v1
kind: Deployment
metadata:
  name: user
  labels:
    app: user
spec:
  replicas: 1
  selector:
    matchLabels:
      app: user
  template:
    metadata:
      labels:
        app: user
    spec:
      containers:
      - name: user
        image: registry.gitlab.com/kclreflect/containers/user:latest
        envFrom:
          - secretRef:
              name: ENV_SECRET
        volumeMounts:
          - name: DB_SECRET 
            mountPath: "/var/tls/DB_SECRET"
            readOnly: true
          - name: DB_PASS_SECRET 
            mountPath: "/var/credentials/DB_PASS_SECRET"
            readOnly: true
        ports:
        - containerPort: 3000
      volumes:
        - name: DB_SECRET 
          secret:
            secretName: DB_SECRET 
        - name: DB_PASS_SECRET 
          secret:
            secretName: DB_PASS_SECRET 
