Skip to content
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

enableCustomizerRuntime not supported? #382

Closed
conor-nsurely opened this issue Aug 21, 2023 · 2 comments
Closed

enableCustomizerRuntime not supported? #382

conor-nsurely opened this issue Aug 21, 2023 · 2 comments

Comments

@conor-nsurely
Copy link

My pulsar functions are running in Kubernetes and I would like to enable the customizerRuntime so that I can pass customRuntimeOptions when creating a pulsar function. For setting resource limits and changing job names etc.

Expected behavior

When I create a function via the admin API, I expect the customRuntimeConfig to be applied, e.g. the Jobname should be the name that appears in Kubernetes.

Function config in the values.yml is like so:

`functions:
replicaCount: 1

enableCustomizerRuntime: "true"
runtimeCustomizerClassName: "org.apache.pulsar.functions.runtime.kubernetes.BasicKubernetesManifestCustomizer"`

Also using these two settings for the broker config

broker: replicaCount: 1 configData: enablePackagesManagement: "true" functionsWorkerEnabled: "true"

The customRuntimeOptions are being passed correctly, I can see them if I fetch the function config from the admin api, here is an example. Notice the cusomRuntimeOptions at the end.

{ "tenant": "a0000001", "namespace": "b0000001", "name": "yg2tsEHNq8KkUypi", "className": "", "inputSpecs": { "persistent://a0000001/b0000001/c0000001": { "schemaProperties": {}, "consumerProperties": {}, "poolMessages": false, "regexPattern": false } }, "output": "persistent://a0000001/b0000001/d0000001", "producerConfig": { "useThreadLocalProducers": false, "batchBuilder": "", "compressionType": "LZ4" }, "processingGuarantees": "ATLEAST_ONCE", "retainOrdering": false, "retainKeyOrdering": false, "forwardSourceMessageProperty": true, "userConfig": { "__function_config": { "__function_type": "function", "__transformer_id": "", "__cluster_id": "", "__user_config": { "testingKey": "testingValue" } } }, "runtime": "GO", "autoAck": true, "parallelism": 1, "resources": { "cpu": 1.0, "ram": 1073741824, "disk": 10737418240 }, "cleanupSubscription": true, "customRuntimeOptions": "{\"jobName\":\"testJobName\"}", "subscriptionPosition": "Latest" }

The "resources" for the function default to a crazy unscheduable value also, I know the resources can be set elsewhere but I would like to set them in the customRuntimeOptions map.

Actual behavior

The customRuntimeOptions have no effect.

Steps to reproduce

Attempt to create a function passing customRuntimeOptions, set the "jobName" to any value and observe that it is ignored when the function is created.

System configuration

Pulsar version: 3.0.1
Kubernetes: 1.27

@lhotari
Copy link
Member

lhotari commented Feb 21, 2024

You can configure the function worker with keys starting with PF_ in .Values.broker.configData.
These keys use the gen-yml-from-env.py script to override values in the default function-worker.yml file.

@lhotari
Copy link
Member

lhotari commented Feb 21, 2024

I hope #462 clarifies the way of configuring things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants