apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: users
  name: users
spec:
  replicas: 1
  selector:
    matchLabels:
      app: users
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: users
    spec:
      containers:
        - env:
            - name: CONFIG
              value: /oada.config.js
            - name: DEBUG
              value: '*:error,*:warn,*:info'
            - name: DOMAIN
              value: localhost
            - name: NODE_ENV
              value: production
            - name: NODE_TLS_REJECT_UNAUTHORIZED
              value: '0'
            - name: PINO_TRANSPORT
              value: yarn g:pretty -clti pid,hostname
            - name: arangodb__ensureDefaults
              value: 'true'
          image: oada/users:edge
          securityContext:
            runAsNonRoot: true
            # run as user node (uid 1000)
            runAsUser: 1000
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
          name: users
          volumeMounts:
            - mountPath: /tmp
              name: tmp
      volumes:
        - name: tmp
          emptyDir:
            medium: Memory
      restartPolicy: Always
