Skip to main content

Hooks

Hooks are tasks triggered by specific events during a deployment. For example, you can use Hooks to automatically run a database migration or collect statistics whenever a new version of your application is deployed. These tasks also run in pods, making it straightforward to troubleshoot by examining the logs.

If you want to learn more about hooks, click here.

FAQs

How can I configure memory and CPU settings for my Hook?

You can configure the CPU Min and CPU Max values to set the minimum and maximum CPU resources each instance in your cluster can use. Similarly, you set Memory Min and Memory Max for memory allocation per instance.

Lets add a Hook for your Project

1. Navigate to create Hook section

Into the Left Pane, access Executions. Then select the Hook tab and then, at the top right corner, click on the Create button.

hook-list

2. Select a Project and a Name for the hook

Start with the basic information, complete these attributes and click Next to continue.

AttributeDescription
NameIdentify your web service.
ProjectSelect between the existent projects.
CommandThe command that runs the service.

Once those attributes are completed, click the Next button to move forward.

hook-create-1

3. Define the deploy event

Select when your hook will execute and click Next.

AttributeDescription
EventDefine when execute the hook. Check available events
hook-create-2

5. Finish the set up

This step outlines the key attributes for configuring the resources of a Hook in SleakOps, allowing for flexible management of CPU, memory, and scaling behaviors.

AttributeDescription
CPU MinThe minimum amount of CPU resources allocated for each instance in the cluster. This ensures that each instance always has this amount of CPU available.
CPU MaxThe maximum CPU resources that each instance in the cluster can use. This cap helps prevent any single instance from consuming too much CPU.
Memory MinThe minimum amount of memory allocated for each instance in the cluster. This guarantees that the instance has enough memory to operate efficiently.
Memory MaxThe maximum amount of memory each instance in the cluster can utilize. It limits the memory usage to prevent any single instance from overconsuming resources.
hook-create-3

Submit to create and Deploy your hook.