---
# Extended from the Deployment generated by the `webservice` command.
# See scripts/get_webservice_deployment.py for dumping script.

# Since `webservice` is no longer used to build routing resources,
# a separate script should be run to do those. See
# scripts/

apiVersion: apps/v1

kind: Deployment
metadata:
    labels:
        app.kubernetes.io/component: web
        app.kubernetes.io/managed-by: webservice
        name: zoomiebot
        toolforge: tool
    name: zoomiebot
    namespace: tool-zoomiebot
spec:
    replicas: 1
    selector:
        matchLabels:
            app.kubernetes.io/component: web
            app.kubernetes.io/managed-by: webservice
            name: zoomiebot
            toolforge: tool
    template:
        metadata:
            labels:
                app.kubernetes.io/component: web
                app.kubernetes.io/managed-by: webservice
                name: zoomiebot
                toolforge: tool
        spec:
            containers:
                - command: [/usr/bin/webservice-runner, --type, lighttpd, --port, '8000']
                  image: docker-registry.tools.wmflabs.org/toolforge-php73-sssd-web:latest
                  name: webservice
                  ports:
                      - {containerPort: 8000, name: http, protocol: TCP}
                  resources:
                      limits: {cpu: '0.5', memory: 512Mi}
                      requests: {cpu: '0.125', memory: 256Mi}
                  stdin: false
                  tty: false
                  workingDir: /data/project/zoomiebot/
                - command: [/usr/bin/bash, "-c", "source $HOME/.profile && npm run start"]
                  image: docker-registry.tools.wmflabs.org/toolforge-bullseye-sssd:latest
                  name: bot
                  ports:
                      - {containerPort: 8001, name: http, protocol: TCP}
                  resources:
                      limits: {cpu: '0.5', memory: 512Mi}
                      requests: {cpu: '0.125', memory: 256Mi}
                  stdin: false
                  tty: false
                  workingDir: /data/project/zoomiebot/project
