Allow resources to take a new nvpair set (comparable to instance attributes and meta-attributes), something like:
<environment id="rsc1-env1"> <nvpair id="rsc1-env1-var1" name="MYAGENT_DEBUG" value="1"/> ... </environment>
The scheduler would add these to start actions in the transition graph, the controller would pass them to the executor, and the executor (probably via the services library) would set them in the forked child's environment before exec'ing the agent.
This would be especially useful for bundles, which currently can load environment variables from /etc/pacemaker/pcmk-init.env inside the container, to avoid having to add that file to the container image. Bundles could potentially pass the variables via the container launcher command line rather than use the above approach.