You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the third part of the exploration for the github-profiles-automator charm. This part includes using the prototype charm that has been written in the second part, and expanding the following:
Writing charm code that watches for the Pebble notify event, and the respective event handler
Deciding and implementing how the charm code will access the information of the fetched repository that exists in the workload container
What needs to get done
Look into Pebble notices and how we can watch for the event that is called by the wrapper script in the workload container
Decide on a mechanism for passing the repository data from the charm code
A prototype charm for github-profiles-automator that can pull from a repository, notify the charm, and the charm responding to the notification, and reconciling with the newly updated data.
The text was updated successfully, but these errors were encountered:
We can specify a storage object of type filesystem in the charmcraft.yaml file, which creates a PVC that can be accessed by both the workload and the charm container. We have to mount this PVC into the workload container using the mounts field in charmcraft.yaml, and specify the location that we use in the --root option of the git-sync command.
Pebble notices
We can use Pebble notices to pass a message from the workload container to the charm. I've written a very simple wrapper script that simply calls pebble notify:
Note that the notification key (in this case github-profies-automator.com/sync) must have a specific format as specified in the documentation.
We can then add an event handler in the charm, to execute code when it receives the pebble-custom-notice event. The handler will check that the notification has the expected key github-profies-automator.com/sync (and has not been activated from a different place), and in the final charm, the reconcile() function from #8 will be called.
Context
This exploration task follows #5.
This is the third part of the exploration for the
github-profiles-automator
charm. This part includes using the prototype charm that has been written in the second part, and expanding the following:What needs to get done
Definition of Done
github-profiles-automator
that can pull from a repository, notify the charm, and the charm responding to the notification, and reconciling with the newly updated data.The text was updated successfully, but these errors were encountered: