You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/02/24 17:49:19 UTC
[GitHub] [pulsar] rivernate opened a new pull request #6411: [functions]
Allow custom resources for k8s
rivernate opened a new pull request #6411: [functions] Allow custom resources for k8s
URL: https://github.com/apache/pulsar/pull/6411
### Motivation
Currently for functions running in kubernetes both the request and limit for cpu and memory are specified by resources arguments. The problem is that sometimes it makes sense for the request and limit to be different values.
### Modifications
This commit adds the ability to the BasicKubernetesCustomizer to individualy override the request and limit values for cpu and memory.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change added tests and can be verified as follows:
- *Added test to ensure that the values specified in the custom runtime options are passed to the containers*
### 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: no
- The rest endpoints: no
- The admin cli options: yes
- Anything that affects deployment: no
### Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? In the "functions-runtime" doc
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] jiazhai commented on issue #6411: [functions] Allow custom
resources for k8s
Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6411: [functions] Allow custom resources for k8s
URL: https://github.com/apache/pulsar/pull/6411#issuecomment-607558926
/pulsarbot run-failure-checks
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] sijie commented on a change in pull request #6411:
[functions] Allow custom resources for k8s
Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #6411: [functions] Allow custom resources for k8s
URL: https://github.com/apache/pulsar/pull/6411#discussion_r383475130
##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/BasicKubernetesManifestCustomizer.java
##########
@@ -42,6 +41,10 @@
*/
public class BasicKubernetesManifestCustomizer implements KubernetesManifestCustomizer {
+ String RESOURCE_CPU = "cpu";
+ String RESOURCE_MEMORY = "memory";
Review comment:
```suggestion
private static final String RESOURCE_MEMORY = "memory";
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] sijie merged pull request #6411: [functions] Allow custom
resources for k8s
Posted by GitBox <gi...@apache.org>.
sijie merged pull request #6411: [functions] Allow custom resources for k8s
URL: https://github.com/apache/pulsar/pull/6411
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] rivernate commented on a change in pull request #6411:
[functions] Allow custom resources for k8s
Posted by GitBox <gi...@apache.org>.
rivernate commented on a change in pull request #6411: [functions] Allow custom resources for k8s
URL: https://github.com/apache/pulsar/pull/6411#discussion_r384016197
##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/BasicKubernetesManifestCustomizer.java
##########
@@ -42,6 +41,10 @@
*/
public class BasicKubernetesManifestCustomizer implements KubernetesManifestCustomizer {
+ String RESOURCE_CPU = "cpu";
+ String RESOURCE_MEMORY = "memory";
Review comment:
done
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] sijie commented on a change in pull request #6411:
[functions] Allow custom resources for k8s
Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #6411: [functions] Allow custom resources for k8s
URL: https://github.com/apache/pulsar/pull/6411#discussion_r383475037
##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/BasicKubernetesManifestCustomizer.java
##########
@@ -42,6 +41,10 @@
*/
public class BasicKubernetesManifestCustomizer implements KubernetesManifestCustomizer {
+ String RESOURCE_CPU = "cpu";
Review comment:
```suggestion
private static final String RESOURCE_CPU = "cpu";
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [pulsar] sijie commented on a change in pull request #6411:
[functions] Allow custom resources for k8s
Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #6411: [functions] Allow custom resources for k8s
URL: https://github.com/apache/pulsar/pull/6411#discussion_r383475206
##########
File path: pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/kubernetes/BasicKubernetesManifestCustomizer.java
##########
@@ -42,6 +41,10 @@
*/
public class BasicKubernetesManifestCustomizer implements KubernetesManifestCustomizer {
+ String RESOURCE_CPU = "cpu";
+ String RESOURCE_MEMORY = "memory";
+ String[] RESOURCES = {RESOURCE_CPU, RESOURCE_MEMORY};
Review comment:
```suggestion
private static final String[] RESOURCES = {RESOURCE_CPU, RESOURCE_MEMORY};
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services