Questo contenuto non è disponibile nella lingua selezionata.

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>"
Copy to Clipboard Toggle word wrap

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
Copy to Clipboard Toggle word wrap
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.
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat