addisonj opened a new pull request #5400: [functions] Allow functions to pass 
runtime specific options
URL: https://github.com/apache/pulsar/pull/5400
 
 
   
   ### Motivation
   
   This commit adds a new argument for functions, customRuntimeOptions, which 
is passed to
   funcions (as well as sources/sinks) that enables the ability to
   customize the runtime.
   
   This is added primarily to support the `KubernetesManifestCustomizer`
   interface. This interface is intended, as the name indicates, allows for
   customizing how the kubernetes manifests are generated before they
   are sent off to the k8s cluster. 
   
   This interface has a default implementation, which allows for
   changing the namespace, labels, nodeSelector labels, and toleratations per 
function.
   
   This interface is also pluggable, allowing for more customized
   implementations. For example, the functions for a given tenant could be
   mapped to different pools of compute for isolation.
   
   ### Modifications
   
   For the CLI and protobufs, the modifications just involve plumbing through 
the new option, `customRuntimeOptions` through the relevant code. 
   
   For kubernetes runtime, the modifications are fairly straight forward, 
adding a new configuration option, `kubernetesManifestCustomizerClassName` and 
`kubernetesManifestCustomizerConfig` which are options under the kubernetes 
runtime.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This commit adds some tests:
   
     - Adds tests for the kubernetes runtime with the default and custom 
implementation that validates the manifest files generated
   - passes existing unit tests 
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API: no
     - The schema: no
     - The default values of configurations:  no
     - The wire protocol: yes, only of functions protobufs, adds a new field, 
customRuntimeOptions, which is a simple string
     - The rest endpoints: no
     - The admin cli options: yes, adds `custom-runtime-options` flags to the 
create/update commands for functions, sources, and sinks, which populates the 
above protobuf field
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
     - Does this pull request introduce a new feature?  yes
     - If yes, how is the feature documented? yes, docs
     - If a feature is not applicable for documentation, explain why? 
     - If a feature is not documented yet in this PR, please create a followup 
issue for adding the documentation
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to