Deploy chat-server task scheduler

chat-server has a task scheduler component that runs maintenance and pruning tasks in a periodic fashion.

This component must run as a single instance per environment. In this case we will run a single pod per cluster using singleton pattern.

To create a singleton deployment for chat-server task scheduler component you can use the following strategy:

  • Copy chat-server directory structure to a new folder (e.g.: use task-server as folder name).

    Example folder structure:

    task-server
       ├── chat-server.tar.gz
       ├── .sops.yaml
       └── vars
            ├── sandbox
               └── secrets.yaml
            ├── prod
               └── secrets.yaml
            └── values.yaml

    HighSide recommends keeping this directory structure under version control (Git repository).

  • Edit values.yaml file:

    • Set replicaCount to 1

    • Set CHAT_RUN_HOURLY_TASKS to true in appConf section.

    • Disable autoscaling for this component:

      autoscaling:
        enabled: false
    • Set service section like this (no need for an external LB on this component):

      service:
        type: ClusterIP
        port: 8080
        targetPort: 8080
    • (recommended) Set CHAT_RUN_RELAY_SERVER to false. This will make this pod work as task scheduler only (no client relaying).

  • Deploy using helm secrets plugin (See 5.5. section). Use task-server as release name. Use same .tar.gz file provided for chat-server

    cd ../task-server/
    helm secrets install task-server \
        -f vars/values.yaml \
        -f vars/sandbox/secrets.yaml \
        "chat-server.tar.gz" \
        -n highside

Last updated