apiVersion: apps/v1
kind: Deployment
metadata:
  name: csharpwars-api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: csharpwars-api
  template:
    metadata:
      labels:
        app: csharpwars-api
    spec:
      containers:
      - name: csharpwars-api
        image: csharpwars.azurecr.io/csharpwars-api:latest
        env:
          - name: KEY_VAULT
            value: "https://akv-csharpwars.vault.azure.net/"
          - name: CLIENT_ID
            valueFrom:
              secretKeyRef:
                name: secret-keyvault
                key: client-id
          - name: CLIENT_SECRET
            valueFrom:
              secretKeyRef:
                name: secret-keyvault
                key: client-secret
          - name: ARENA_SIZE
            value: "10"
          - name: VALIDATION_HOST
            value: ""
          - name: BOT_DEPLOYMENT_LIMIT
            value: "1"
          - name: CERTIFICATE_FILENAME
            value: ""
          - name: CERTIFICATE_PASSWORD
            value: ""
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 5000