Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue 9867][scripts] Fixes issue (apache#9884)
Fixes apache#9867 ### Motivation As described in the issue the script to modify configuration yaml file (used by functions worker) did not work with array type variables. This fix allows specifying same values for array properties like `authenticationProviders` in environment variables (with `PF_` prefix) as the ones used by `apply-config-from-env.py` for conf files, i.e. a comma separated list of values. E.g. You can define environment variable `PF_authenticationProviders` taking value `org.apache.pulsar.broker.authentication.AuthenticationProviderTls,org.apache.pulsar.broker.authentication.AuthenticationProviderAthenz` to specify two values or `org.apache.pulsar.broker.authentication.AuthenticationProviderTls` to specify only one. In both cases value will be correctly set in final yaml file as an array: ```yaml authenticationProviders: - org.apache.pulsar.broker.authentication.AuthenticationProviderTls - org.apache.pulsar.broker.authentication.AuthenticationProviderAthenz ``` ### Modifications We have just added a check on the variable names that have type `Set<String>` in `WorkerConfig` the same way it is done for `int` variables. We then split the value using ",", which already produces an array type.
- Loading branch information