spring-cloud-dataflow
spring-cloud-dataflow copied to clipboard
App and schedule properties not set while create schedule
I created a task schedule with properties:
app.myparam=value
scheduler.myparam2=2
deployer.task-process.kubernetes.environmentVariables=JAVA_TOOL_OPTIONS=-Xmx512M
deployer.task-process.kubernetes.limits.memory=1024M
deployer.task-process.kubernetes.requests.memory=1024M
So the properties are passed as SCDF hint:
Parameters should start with an app. or scheduler.. Example:
app.myparam=value1
scheduler.myparam2=value2
But when I describe CronJob there is no this properties (myparam, myparam2) - only deployer properties was passed:
szopal@aps00088850-mb:/mnt/d/tmp$ kubectl describe cronjobs test
Name: test
Namespace: ns
Labels: spring-cronjob-id=test-process
Annotations: <none>
Schedule: 10 20 * * *
Concurrency Policy: Allow
Suspend: False
Successful Job History Limit: 3
Failed Job History Limit: 1
Starting Deadline Seconds: <unset>
Selector: <unset>
Parallelism: <unset>
Completions: <unset>
Pod Template:
Labels: spring-cronjob-id=test-process
Service Account: default
Containers:
test-process:
Image: eu.gcr.io/xxxxx/test-process:1.8.10.66-SNAPSHOT
Port: <none>
Host Port: <none>
Args:
--management.metrics.tags.service=task-application
--spring.cloud.task.name=test-process
--spring.datasource.url=jdbc:postgresql://xxxxxxx
--spring.datasource.driverClassName=org.postgresql.Driver
--management.metrics.tags.application=${spring.cloud.task.name:unknown}-${spring.cloud.task.executionid:unknown}
Limits:
memory: 1024M
Requests:
memory: 1024M
Environment:
management.endpoints.web.exposure.include: *
spring.main.allow-circular-references: true
management.endpoint.shutdown.enabled: true
management.server.port: 8888
spring.cloud.gcp.sql.database-name: ebkdb
spring.datasource.driver-class-name: org.postgresql.Driver
spring.datasource.username: ebkadm
spring.cloud.task.batch.fail-on-job-failure: true
spring.banner.location: classpath:/banner/banner-production.txt
spring.datasource.url:
management.endpoint.health.show-details: always
JAVA_TOOL_OPTIONS: -Xmx512M
server.port: 8080
spring.cloud.config.enabled: false
spring.config.location: /etc/config/
spring.datasource.hikari.schema: xxx
spring.cloud.gcp.sql.instance-connection-name: xxxxxx:xxx:xxx
SPRING_CLOUD_APPLICATION_GUID: (v1:metadata.uid)
Mounts:
/etc/config/application.yaml from config (rw,path="application.yaml")
/etc/config/truststore.jks from config-secret (rw,path="truststore.jks")
Volumes:
config:
Type: ConfigMap (a volume populated by a ConfigMap)
Name: cm-task-process-file
Optional: false
config-secret:
Type: Secret (a volume populated by a Secret)
SecretName: secret-task-process
Optional: false
Last Schedule Time: <unset>
Active Jobs: <none>
Events: <none>
SCDF v. 2.9.4
@szopal
Properties aimed at an app or scheduler need to be app.<appname>.property=value
Closing as the question has been answered.