Show Table of Contents
8.2. Cartridge Event Subscriptions
When OpenShift Enterprise adds a cartridge to an application, it uses entries in the
Subscribes section of the $cartridge_name/metadata/manifest.yml file in other cartridges to determine what actions to take for those other cartridges. Define subscribe events in the manifest.yml file using the following format:
Subscribes:
<event_name>:
Type: "<event type>"
Example 8.2. PHP Cartridge Subscribes Entry
Subscribes:
set-env:
Type: "ENV:*"
Required: false
set-mysql-connection-info:
Type: "NET_TCP:db:mysql"
Required: false
set-postgres-connection-info:
Type: "NET_TCP:db:postgres"
Required: false
set-doc-url:
Type: "STRING:urlpath"
Required: false
When OpenShift Enterprise processes a cartridge publish script, it inputs the result to subscriber scripts in other cartridges that match the
Type of the publish event. The input to matching subscriber scripts is prefaced with $cartridge_name/hooks/<event_name> <gear_name> <namespace> <gear_uuid>.
For each matching
Subscribes entry, OpenShift Enterprise runs a script named $cartridge_name/hooks/$event_name. OpenShift Enterprise must send and process entries marked with Required: true.
The publisher script determines the format of the information input to the subscriber script. Ensure that subscriber script can parse the input correctly.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.