Hook

In Juju, a hook is a Juju event that a Juju unit agent uses to communicate with a charm.

In the charm SDK, in Ops, Juju events = ‘hooks’ are translated into Ops events = ‘events’, specifically, into classes that inherit from HookEvent.

Contents:

List of hooks

Source

  • <action name>-action
  • <container name>-pebble-change-updated
  • <container name>-pebble-custom-notice
  • <container name>-pebble-ready
  • <endpoint name>-relation-broken
  • <endpoint name>-relation-changed
  • <endpoint name>-relation-created
  • <endpoint name>-relation-departed
  • <endpoint name>-relation-joined
  • <storage name>-storage-attached
  • <storage name>-storage-detaching
  • collect-metrics
  • config-changed
  • install
  • leader-deposed
  • leader-elected
  • leader-settings-changed
  • meter-status-changed
  • post-series-upgrade
  • pre-series-upgrade
  • remove
  • secret-changed
  • secret-expired
  • secret-remove
  • secret-rotate
  • start
  • stop
  • update-status
  • upgrade-charm

Contributors: @anvial, @hmlanigan, @ppasotti , @simonrichardson, @tmihoc

Last updated 18 days ago. Help improve this document in the forum.