apiVersion: apps/v1
kind: Deployment
metadata:
  name: users-service-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      component: server-users
  template:
    metadata:
      labels:
        component: server-users
    spec:
      containers:
      - name: server-users
        image: riliadmin/users-service:latest
        resources:
          limits:
            memory: "128Mi"
            cpu: "75m"
        ports:
        - containerPort: 7770
        env:
        - name: USERS_SERVICE_API_PORT
          value: "7770"
        - name: URI_WHITELIST
          value: "https://rili.network,https://www.rili.network"
        - name: HONEYCOMB_API_KEY
          valueFrom:
            secretKeyRef:
              name: honeycomb-writekey
              key: key
        - name: LOG_LEVEL
          value: "info"
        - name: REDIS_NODE_ONE_HOST
          value: "redis-cluster-ip-service"
        - name: REDIS_NODE_ONE_PORT
          value: "6379"
        - name: PG_USER
          value: "postgres"
        - name: PG_HOST
          value: "postgres-cluster-ip-service"
        - name: PG_PORT
          value: "5432"
        - name: USERS_SERVICE_PG_DATABASE
          value: "rili_users"
        - name: PG_PASSWORD
          valueFrom:
            secretKeyRef:
              name: pgpassword
              key: PGPASSWORD
        - name: SECRET
          valueFrom:
            secretKeyRef:
              name: riliapisecret
              key: RILIAPISECRET