apiVersion: apps/v1
kind: Deployment
metadata:
  name: csharpwars-web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: csharpwars-web
  template:
    metadata:
      labels:
        app: csharpwars-web
    spec:
      containers:
      - name: csharpwars-web
        image: csharpwars.azurecr.io/csharpwars-web: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: "http://csharpwars-validator:5050/status"
          - name: BOT_DEPLOYMENT_LIMIT
            value: "1"
          - name: POINTS_LIMIT
            value: "200"
          - name: ARENA_URL
            value: "https://localhost"
          - name: SCRIPT_TEMPLATE_URL
            value: "https://localhost"
          - name: ENABLE_CUSTOM_PLAY
            value: "True"
          - name: ENABLE_TEMPLATE_PLAY
            value: "True"
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        ports:
        - containerPort: 5000