Version: 0.3
Architecture
Pullup consists of two components: webhook and controller.
Webhook#
The webhook listens to GitHub events.
When the webhook receive a event, it will lookup webhooks by the repositories array.
- When a pull request is opened or reopened, the webhook will create a new 
ResourceSetbased onWebhook. - When a pull request is updated, the webhook will update the existing 
ResourceSet. - When a pull request is closed or merged, the webhook will delete 
ResourceSetmatching the labelswebhook-nameandpull-request-number. 
Controller#
The controller monitors changes of Webhook and ResourceSet.
Webhook#
- When a 
Webhookis updated, the controller will updatespec.resourcesinResourceSetmatching the labelwebhook-name. 
ResourceSet#
- When a 
ResourceSetis created, the controller will find the original resources byapiVersion,kindandmetadata.name.- If the resources exist, the controller will merge the 
resourcesarray into the original resources and create resources using the merged result. - If the resources does not exist, the controller will create resources using the 
resourcesarray directly. 
 - If the resources exist, the controller will merge the 
 - When a 
ResourceSetis updated, the controller will also merge the current resource before merging theresourcesarray. 
Merge Strategy#
- Map
- Replace existing keys with new values.
 - Copy new keys.
 
 - Array
- If all elements in the array contain 
namekey, the array will be merged using thenamekey. - Otherwise, replace with new values.
 
 - If all elements in the array contain 
 
Structured Merge and Diff may be implemented in the future.