FilKarnicki commented on code in PR #309:
URL: https://github.com/apache/flink-statefun/pull/309#discussion_r841456053


##########
docs/content/docs/modules/overview.md:
##########
@@ -61,3 +61,36 @@ spec:
 
 A module YAML file can contain multiple YAML documents, separated by `---`, 
each representing a component to be included in the application.
 Each component is defined by a kind typename string and a spec object 
containing the component's properties.
+
+# Configuration string interpolation
+You can use `${placeholders}` inside `spec` elements. These will be replaced 
by entries from a configuration map, consisting of: 
+1. System properties
+2. Environment variables
+3. flink-conf.yaml entries with prefix 'statefun.module.global-config.' 
+4. Command line args
+
+where (4) override (3) which override (2) which override (1). 
+
+Example:
+```yaml
+kind: io.statefun.endpoints.v2/http
+spec:
+  functions: com.example/*
+  urlPathTemplate: ${FUNC_PROTOCOL}://${FUNC_DNS}/{function.name}
+---
+kind: io.statefun.kafka.v1/ingress
+spec:
+  id: com.example/my-ingress
+  address: ${KAFKA_ADDRESS}:${KAFKA_PORT}
+  consumerGroupId: my-consumer-group
+  topics:
+    - topic: ${KAFKA_INGRESS_TOPIC}
+      (...)
+  properties:
+    - ssl.truststore.location: ${SSL_TRUSTSTORE_LOCATION}
+    - ssl.truststore.password: ${SSL_TRUSTSTORE_PASSWORD}
+    (...)

Review Comment:
   I like the idea of logging the effective yaml somewhere. We should probably 
make it an opt-in kind of a deal, since we don't want to be automatically 
logging secrets. I'll hold off on coding this until we hear from @igalshilman 



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to