apiVersion: apps/v1
kind: Deployment
metadata:
  name: iam
  labels:
    app: iam
spec:
  replicas: 1
  selector:
    matchLabels:
      app: iam
  template:
    metadata:
      labels:
        app: iam
    spec:
      containers:
      - name: iam
        image: bamaas/fullstackfit_iam:latest
        env:
        - name: KEYCLOAK_USER
          value: "keycloakuser"
        - name: KEYCLOAK_PASSWORD
          value: "keycloakpassword"
        - name: PROXY_ADDRESS_FORWARDING
          value: "true"
        - name: KEYCLOAK_FRONTEND_URL
          value: "https://auth.doyoueventrack.app/auth"
        - name: DB_VENDOR
          value: "postgres"
        - name: DB_USER
          value: "postgres"
        - name: DB_PASSWORD
          value: "postgres"
        - name: DB_ADDR
          value: "database"
        - name: DB_PORT
          value: "5432"
        - name: DB_DATABASE
          value: "postgres"
        - name: DB_SCHEMA
          value: "iam"
        ports:
        - name: http
          containerPort: 8080
        - name: https
          containerPort: 8443
        readinessProbe:
          httpGet:
            path: /auth/realms/master
            port: 8080
        resources:
          requests:
            memory: "200Mi"
            cpu: "100m"
          limits:
            memory: "350Mi"