addisonj commented on issue #5400: [functions] Allow functions to pass runtime 
specific options
URL: https://github.com/apache/pulsar/pull/5400#issuecomment-552625063
 
 
   @jerrypeng I ended up re-working this a fair amount to be more in-line with 
some of your ideas. Primarily:
   
   - created the `RuntimeCustomizer` class and had the 
`KubernetesManifestCustomizer` extend that class
   - the `RuntimeCustomizer` now gets created in the `FunctionRuntimeManager` 
and is passed to all `RuntimeFactory` classes 
   - reverted the changes to how the `FunctionAuthProvider` gets created to 
also be back in `FunctionRuntimeManager`
   
   To make this work, it required a few changes to some of the interfaces, 
primarily:
   
   - The `FunctionAuthProvider` now takes the `FunctionDetails`, this gives us 
all the data we need to effectively have the `FunctionAuthProvider` call the 
`KubernetesManifestCustomizer` so that we could get at the 
`customRuntimeOptions` which may change the namespace that secrets are created 
under. Additionally, this seems like a sane thing to do as now implementors of 
that interface get more data, which could be useful for different types of 
implementations
   - Made some small tweaks to the `RuntimeFactory` such that the returned 
`FunctionAuthProvider` and `RuntimeCustomzer` can be sub-classes of those 
classes that are specialized by implementing interfaces
   - Changed the `KubernetesManifestCustomizer` such that it only needs one 
instance of it as all the data needed to customize is passed via the methods 
(basically added `FunctionDetails` being passed to all calls)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to