Question: Change the Rancher Agent image

I am using Rancher 2.4 and I would like to use a private registry for my entire Rancher system (Server and agents).

Deployment method:
1- Deployment of Rancher server via Helm.
2- Retrieve the agent manifest from the Rancher API then apply it.

The problem is that with my way of deploying, I can’t manage to add:
"imagePullSecrets:

  • name: regcred "
    for agent Rancher and therefore agent cannot pull the image.

Is there a way to add the secret in the agent manifest to automatically pull the correct image?

Thank you