-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add granular update & delete options to GenericController #89
Comments
It will be better to use specific response:
allowedDeletes:
- kind:
apiVersion:
name:
namespace:
allowedUpdates:
- kind:
apiVersion:
name:
namespace: In addition, a few scenarios might want to expose those resources that are eligible to be sync-ed (i.e. both update, delete). OTH the response structure can look like the following: response:
allowedSyncs:
- kind:
apiVersion:
name:
namespace:
allowedDeletes:
- kind:
apiVersion:
name:
namespace:
allowedUpdates:
- kind:
apiVersion:
name:
namespace: |
We might want to consider following cases:
response:
allowedDeletes:
- kind:
apiVersion:
name:
namespace:
allowedUpdates:
- kind:
apiVersion: NOTE: One might consider using wildcards i.e. '*' as well. For example: response:
allowedDeletes:
- kind:
apiVersion:
name:
namespace:
allowedUpdates:
- kind: *
apiVersion: *
namespace: * # * is the default value for namespace
name: * # * is the default value for name |
I have started working on this! Generic controller's hook response will have two new fields:
|
closing this as part of #141 |
Problem Statement: A GenericController can create, update or delete any attachments. There are no visible issues if this controller deletes or updates the attachments which were created by this controller. However, one would like to exercise finer control via GenericController while trying to delete or update resources that were not created by the same controller. GenericController already supports
UpdateAny
&DeleteAny
options which is common to all the attachments specified in its spec. However, this is too liberal and can create problems if not programmed properly. There are also other scenarios where one would like to only Update certain kind of attachments whereas Delete certain kind of attachments and at the same time do nothing for certain kind of attachments. All these scenarios calls for finer granularity while exercising these Update/Delete/Noop operations.Possible Solution: One of the possible approaches can be to expose new tunables in GenericController's HookResponse API. This new tunables can be set by controller developers who write the reconcile logic. In other words, this will be controlled from inside the hook code & not by Metac. This also allows us to avoid setting generic tunables like
UpdateAny
&DeleteAny
in the spec.sample hook response
The text was updated successfully, but these errors were encountered: