Receiver hooks provide a URL that triggers actions within the Rancher when accessed.

In Rancher, you can create receiver hooks. These hooks provide a URL that can trigger events in the Rancher. For example, receiver hooks can be integrated with monitoring systems to increase or decrease the number of containers served. On the API -> Webhooks page, you can view or create a receive hook.

Adding a Mirror Warehouse

Added a Receiver Hooks

To create a receiver hook, navigate to API -> Webhooks, click Add Receiver

  • Fill in the receiver name for easy identification.

  • Select the type of receiver you want to create.

  • Determine sink events based on the type of sink.

Click Create. Once created, you can see the URL next to the newly created receiver hook.


The effect is as follows

Note that server selectors must match container labels to be upgraded.

Login configuration trigger

The configuration is as follows:

You can view the records triggered by each image submission

Trigger a URL. By triggering its own Webhook, the service selected by the Rancher trigger hook is upgraded. Rancher trigger hooks need to provide specific information by default. Using both Rancher’s receiver hooks and other Webhooks, POST requests need to include the following fields:

{    "push_data": {        "tag": <pushedTag>    },    "repository": {        "repo_name": <image>    }}Copy the code

Submit the code. View the automatic image building process. When done, view Rancher’s service jwordpress for automatic upgrade.

Rancher will be notified to upgrade the service every time an image is updated. It’s a great experience. It’s great to use.