[GitHub] tysonnorris commented on a change in pull request #154: container network/dns converted to PureConfig

2018-02-27 Thread GitBox
tysonnorris commented on a change in pull request #154: container network/dns 
converted to PureConfig
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/154#discussion_r171003517
 
 

 ##
 File path: kubernetes/invoker/invoker.yml
 ##
 @@ -93,12 +93,12 @@ spec:
 key: api_host
 
   # Docker-related options
-  - name: "INVOKER_CONTAINER_NETWORK"
+  - name: "CONFIG_whisk_containerFactory_containerArgs_network"
 valueFrom:
   configMapKeyRef:
 name: invoker.config
 key: invoker_container_network
-  - name: "INVOKER_CONTAINER_DNS"
+  - name: "CONFIG_whisk_containerFactory_containerArgs_dnsServers"
 valueFrom:
   configMapKeyRef:
 name: invoker.config
 
 Review comment:
   BTW - a couple options I can think of here:
   * update kube configs to explicitly provide each array entry (no change 
non-kube change required, but I'm not sure if this complicates things for the 
kube configs)
   * update transformEnvironment to do the needful when a var ends with 
`.array`, e.g. 
   ```
   
CONFIG_whisk_containerFactory_containerArgs_dnsServers.array="8.8.8.8,8.8.4.4" 
-> 
   CONFIG_whisk_containerFactory_containerArgs_dnsServers_0=8.8.8.8
   CONFIG_whisk_containerFactory_containerArgs_dnsServers_1=8.8.4.4
   ```
   * provide a custom parser to pureconfig 
https://pureconfig.github.io/docs/supporting-new-types.html . I did this 
originally for the array handling but since there is some basic support in 
lightbend config, removed it in favor of the lightbend array impl (where env 
vars ending with `.` are treated as array type).


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] tysonnorris commented on a change in pull request #154: container network/dns converted to PureConfig

2018-02-26 Thread GitBox
tysonnorris commented on a change in pull request #154: container network/dns 
converted to PureConfig
URL: 
https://github.com/apache/incubator-openwhisk-deploy-kube/pull/154#discussion_r170778534
 
 

 ##
 File path: kubernetes/invoker/invoker.yml
 ##
 @@ -93,12 +93,12 @@ spec:
 key: api_host
 
   # Docker-related options
-  - name: "INVOKER_CONTAINER_NETWORK"
+  - name: "CONFIG_whisk_containerFactory_containerArgs_network"
 valueFrom:
   configMapKeyRef:
 name: invoker.config
 key: invoker_container_network
-  - name: "INVOKER_CONTAINER_DNS"
+  - name: "CONFIG_whisk_containerFactory_containerArgs_dnsServers"
 valueFrom:
   configMapKeyRef:
 name: invoker.config
 
 Review comment:
   Sorry for the delay! 
   I can't tell whether configMapKeyRef will 'do the right thing' here; in this 
case 'the right thing' may not be obvious, but should be something like: 
   ```
   CONFIG_whisk_containerFactory_containerArgs_dnsServers_0=8.8.8.8
   CONFIG_whisk_containerFactory_containerArgs_dnsServers_1=8.8.4.4
   ```
   AFAIK this is the only way to produce an array typed value in lightbend 
config, and currently this is an array typed value. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services