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-serverdirectory structure to a new folder (e.g.: usetask-serveras folder name).Example folder structure:
task-server ├── chat-server.tar.gz ├── .sops.yaml └── vars ├── sandbox │ └── secrets.yaml ├── prod │ └── secrets.yaml └── values.yamlHighSide recommends keeping this directory structure under version control (Git repository).
Edit values.yaml file:
Set
replicaCountto1Set CHAT_RUN_HOURLY_TASKS to
trueinappConfsection.Disable
autoscalingfor this component:autoscaling: enabled: falseSet
servicesection 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 secretsplugin (See 5.5. section). Usetask-serveras release name. Use same .tar.gz file provided forchat-servercd ../task-server/ helm secrets install task-server \ -f vars/values.yaml \ -f vars/sandbox/secrets.yaml \ "chat-server.tar.gz" \ -n highside
Last updated