Closed thotz closed 3 years ago
@BlaineEXE @jeffvance @copejon @leseb PTAL
There is no error reported if the user tries to update OBC fields other than additionalCongifData. Also, have you consider that the user can mutate additionalConfigData other than quota (which the user is allowed to change). For example, the storage class's parameters field can contain bucket config data and is passed to the provisioner. What happens if the user changes this config data by updating their obc's additionalConfigData. It seems now a user is allowed to change any bucket config data.
Are these changes even needed any more given this comment? https://github.com/kube-object-storage/lib-bucket-provisioner/issues/195#issuecomment-742282150
Are these changes even needed any more given this comment? #195 (comment)
Atleast at that time focus was needed for bucket notifications(decided to go with label notations
instead of additionalconfig
), now users have similar request for quota as well https://github.com/rook/rook/issues/7146
There is no error reported if the user tries to update OBC fields other than additionalCongifData. Also, have you consider that the user can mutate additionalConfigData other than quota (which the user is allowed to change). For example, the storage class's parameters field can contain bucket config data and is passed to the provisioner. What happens if the user changes this config data by updating their obc's additionalConfigData. It seems now a user is allowed to change any bucket config data.
@jeffvance : I agree that other fields apart from additionalConfigData
should not be modified, this field is opaque to the library so it won't able to know changes made to additionalConfigData
. Sorry I didn't fully understand how storageclass.Parameter
related to additionalConfigData
@jeffvance : I agree that other fields apart from
additionalConfigData
should not be modified, this field is opaque to the library so it won't able to know changes made toadditionalConfigData
. Sorry I didn't fully understand howstorageclass.Parameter
related toadditionalConfigData
1) what happens if the user modifies OBC fields other than additionalConfigData? It looks like there will be no error reported. 2) Re. storage class and parameters- nevermind. I didn't remember that your are passing an options struct to the Update method, which defines the field the Update method sees. Be careful if change to pass a map to Update because then there's a possibility of collisions with the StorageClass.parameters config map.
at that time focus was needed for bucket notifications (decided to go with label notations instead of additionalconfig)
So do we want to also support notification via additionalConfigData?
From above:
what happens if the user modifies OBC fields other than additionalConfigData? It looks like there will be no error reported.
This has not been addressed.
@BlaineEXE what are your thoughts?
at that time focus was needed for bucket notifications (decided to go with label notations instead of additionalconfig)
So do we want to also support notification via additionalConfigData?
Currently not planned to do so
But what if a user modifies both the spec and the additionalConfig?
Good catch @BlaineEXE !
Typo L133: "waith" -> "wait"
lgtm
(for future reference, I prefer to see pr changes in separate commits so that I can re-review only the code that has changed since my previous review)
Sure I keep this in mind while sending PR. Sorry for the trouble and thanks for your patience while reviewing the PR
No worries @thotz - single commit PRs are common, but, IMO, there are advantages to multi-commit PRs with sensible squashing just before merging.
@thotz is Rook going to consume that?
Yes I can update the library for Rook by adding necessary changes
Adding support to handle Update Events of OBC, currently
AdditionalConfig
needs this change. Other fields are immutable Fixes #195 Signed-off-by: Jiffin Tony Thottan thottanjiffin@gmail.com