-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Currently to trigger an update one must pass a full Host Config to Trident, however, must updates will just want to change one or two fields in the configuration. Having to get the entire file and surgically update the desired fields imposes an extra burden on users.
A trident patch action could be used to grab the existing host configuration and apply a patch on it, leaving trident in a "preparing update" state with a cached HC. A user would then be able to just invoke "trident update" to trigger an update using the patched host configuration.
The bulk of the work is defining the API for patching to make it simple to use both programmatically and by humans.
We could look into established mechanisms, such as RFC6902 (probably my suggestion), or what other tools that deal with merging YAML documents do (eg. kubectl patch, kustomize, etc)
Trident uses many lists, so an API that is friendly when modifying lists is desirable.
We're also not modifying arbitrary structures, but a well-known one (Host Config) so maybe the approach for us is not to use a generic API but rather a bespoke API for each area of HC. (This would also allow us to just not expose apis for things that cannot be changes, such as storage)