[Bug] Function worker properties `functionInstanceMinResources` and `functionInstanceMaxResources` not honored
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before asking
- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Version
Pulsar 2.8.4
### Minimal reproduce step
Set following broker environment variables:
```
PF_functionInstanceMaxResources_cpu: "16"
PF_functionInstanceMaxResources_disk: "1073741824"
PF_functionInstanceMaxResources_ram: "17179869184"
PF_functionInstanceMinResources_cpu: "0.256"
PF_functionInstanceMinResources_disk: "1073741824"
PF_functionInstanceMinResources_ram: "536870912"
```
Instantiate a sink without establishing any "resources" in SinkConfig DTO in a K8s environment.
### What did you expect to see?
A pod that executes the sink (pf-xxx) with following resource parameters set for container:
```
Limits:
cpu: 16
memory: 17179869184
Requests:
cpu: 0.256
memory: 1073741824
```
### What did you see instead?
A pod with following parameters set:
```
Limits:
cpu: 1
memory: 1073741824
Requests:
cpu: 1
memory: 1073741824
```
### Anything else?
_No response_
### Are you willing to submit a PR?
- [X] I'm willing to submit a PR!
Contributor guide
Assessment
This issue has not been assessed yet.