如何在Kubernetes上运行Spring CDF应用程序设置-Xmx?

时间:2017-06-14 13:08:37

标签: java spring kubernetes spring-cloud-dataflow

根据documentation,我应该能够使用-Xmx属性设置应用程序的deployer.time.memory

我创建了以下流定义:

dataflow:>stream create --name ticktock --definition "time | log"

我已尝试以多种方式在Kubernetes CDF上部署它:

dataflow:>stream deploy --name ticktock --properties "deployer.time.memory=2048m"

dataflow:>stream deploy --name ticktock --properties "deployer.time.local.memory=2048m"

dataflow:>stream deploy --name ticktock --properties "deployer.time.local.javaOpts=2048m"

每次部署后,我都运行以下命令:

# ps aux | grep time | grep -i xmx
#

# docker ps
CONTAINER ID        IMAGE                                                COMMAND                  CREATED             STATUS              PORTS               NAMES
52a31b764112        springcloudstream/time-source-rabbit:1.2.0.RELEASE   "java -jar /maven/tim"   7 minutes ago       Up 7 minutes                            k8s_ticktock-time.a4ab30e_ticktock-time-kqckg_default_53b3e059-5049-11e7-a0d4-000c29df937a_3cc76216

为什么-Xmx app上没有设置time

1 个答案:

答案 0 :(得分:0)

您在上面引用的属性是local部署者属性,而不是kubernetes部署者属性。对于Kubernetes部署属性,您可以在此处参考文档:http://docs.spring.io/spring-cloud-dataflow-server-kubernetes/docs/current-SNAPSHOT/reference/htmlsingle/