I am using Spring Cloud Data flow for microservice orchestration and deploying them in Kubernetes. My apps pipeline looks something like below: Source-app --> Processor-app --> Sink-app
I am able to create and deploy the stream and it successfully creates deployments and pods and my pipeline works fine with below SCDF deployer properties:
app.Source-app.deployer.kubernetes.livenessProbePath=/api/v1/actuator/health
app.Source-app.deployer.kubernetes.readinessProbePath=/api/v1/actuator/info
app.Source-app.server.port=8080
app.Processor-app.deployer.kubernetes.livenessProbePath=/api/v1/actuator/health
app.Processor-app.deployer.kubernetes.readinessProbePath=/api/v1/actuator/info
app.Processor-app.server.port=8080
app.Sink-app.deployer.kubernetes.livenessProbePath=/api/v1/actuator/health
app.Sink-app.deployer.kubernetes.readinessProbePath=/api/v1/actuator/info
app.Sink-app.server.port=8080
deployer.*.kubernetes.liveness-probe-path=/api/v1/actuator/health
deployer.*.kubernetes.readiness-probe-path=/api/v1/actuator/info
Now my requirement is, I want to store all the above configurations in a ConfigMap in Kubernetes and just refer or mount that ConfigMap in SCDF deployer properties window. I know we can refer using configMapKeyRefs as environment variable(with limitation for only String values) like:
deployer.Source-app.kubernetes.configMapKeyRefs=[{envVarName: 'LIVENESSPROBEPATH', configMapName: 'test-conf', dataKey: 'livenessProbePath }]
app.Source-app.deployer.kubernetes.livenessProbePath=$(LIVENESSPROBEPATH)
... So on for each property...
But this we need to do for each and every property. I am looking for something like, mention all the properties in a configMap and just refer or mount that ConfigMap while deploying stream in SCDF and voila! all your properties are passed to the apps. I was referring the official docs and reading about volumeMounts and persistentVolumes but not very clear. If someone could provide a solution for my usecase, it would be of great help.