apiVersion: apps/v1
kind: Deployment
metadata:
  name: wss-bot
spec:
  selector:
    matchLabels:
      app: wss-bot
  template:
    metadata:
      labels:
        app: wss-bot
    spec:
      containers:
      - name: wss-bot
        image: filario/wss-bot
        resources:
          limits:
            memory: "128Mi"
            cpu: "500m"
        env:
          - name: WSS_TOKEN
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: token
          - name: WSS_FACE_SUBSCRIPTION_KEY
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: face-subscription
          - name: WSS_FACE_ENDPOINT
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: face-endpoint
          - name: WSS_VISION_SUBSCRIPTION_KEY
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: vision-subscription
          - name: WSS_VISION_ENDPOINT
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: vision-endpoint
          - name: WSS_TEXTANALYTICS_SUBSCRIPTION_KEY
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: textanalytics-subscription
          - name: WSS_TEXTANALYTICS_ENDPOINT
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: textanalytics-endpoint
          - name: WSS_CONTENTMODERATOR_SUBSCRIPTION_KEY
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: moderator-subscription
          - name: WSS_CONTENTMODERATOR_ENDPOINT
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: moderator-endpoint
          - name: WSS_TRANSLATOR_SUBSCRIPTION_KEY
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: translator-subscription
          - name: WSS_TRANSLATOR_ENDPOINT
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: translator-endpoint
          - name: WSS_TRANSLATOR_REGION
            value: westeurope
          - name: WSS_FORMRECOGNIZER_SUBSCRIPTION_KEY
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: formrecognizer-subscription
          - name: WSS_FORMRECOGNIZER_ENDPOINT
            valueFrom:
              secretKeyRef:
                name: wss-secret
                key: formrecognizer-endpoint
          - name: WSS_FORMRECOGNIZER_RETRIES_MAXATTEMPTS
            value: "10"
          - name: WSS_FORMRECOGNIZER_RETRIES_INTERVAL
            value: "1000" # milliseconds