You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/11/28 05:22:21 UTC

[GitHub] daisy-ycguo closed pull request #370: Improve support for configuration of action container DNS

daisy-ycguo closed pull request #370: Improve support for configuration of action container DNS
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/370
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/configurationChoices.md b/docs/configurationChoices.md
index 61d1436..54b68d2 100644
--- a/docs/configurationChoices.md
+++ b/docs/configurationChoices.md
@@ -55,13 +55,14 @@ providers:
       username: "admin"
       password: "secret"
 ```
-2. Configure the DNS lookup for the user containers created by DockerContainerFactory to
+2. Configure the DNS nameservers for the user containers created by DockerContainerFactory to
 use Kubernetes's DNS service.  For example, if your cluster uses kube-dns, then first
 get the IP address of Kubernetes DNS server by `echo $(kubectl get svc kube-dns -n kube-system -o 'jsonpath={.spec.clusterIP}')`
 and then add below stanza to your `mycluster.yaml`:
 ```yaml
 invoker:
-  kubeDNS: "<IP_Address_Of_Kube_DNS>"
+  containerFactory:
+    nameservers: "<IP_Address_Of_Kube_DNS>"
 ```
 3. Use the lower performance `KubernetesContainerFactory` by adding the following stanza
 to your `mycluster.yaml`
diff --git a/helm/openwhisk/templates/invoker-pod.yaml b/helm/openwhisk/templates/invoker-pod.yaml
index 836427f..61c4768 100644
--- a/helm/openwhisk/templates/invoker-pod.yaml
+++ b/helm/openwhisk/templates/invoker-pod.yaml
@@ -79,19 +79,22 @@ spec:
               configMapKeyRef:
                 name: whisk.config
                 key: whisk_api_host_name
-          - name: "INVOKER_CONTAINER_NETWORK"
-            value: {{ .Values.invoker.containerNetwork | quote }}
+
           - name: "CONFIG_whisk_docker_containerFactory_useRunc"
             value: {{ .Values.invoker.containerFactory.useRunc | quote }}
 
           - name: "CONFIG_whisk_containerPool_userMemory"
             value: {{ .Values.whisk.containerPool.userMemory | quote }}
 
-          # DNS Server passed to action containers
-{{- if not (eq .Values.invoker.kubeDNS "nil") }}
-          - name: "CONFIG_whisk_containerFactory_containerArgs_dnsServers_0"
-            value: {{ .Values.invoker.kubeDNS }}
-{{ end }}
+{{- if ne .Values.invoker.containerFactory.nameservers "" }}
+          # DNS Server(s) to be used by action containers
+  {{- range $index, $element := splitList ":" .Values.invoker.containerFactory.nameservers }}
+          - name: "CONFIG_whisk_containerFactory_containerArgs_dnsServers_{{ $index }}"
+            value: {{ $element | quote }}
+  {{- end }}
+{{- end }}
+          - name: "CONFIG_whisk_docker_containerFactory_containerArgs_network"
+            value: {{ .Values.invoker.containerFactory.containerNetwork | quote }}
 
           # Invoker name is the name of the node (DaemonSet) or pod (StatefulSet)
           - name: "INVOKER_NAME"
diff --git a/helm/openwhisk/values.yaml b/helm/openwhisk/values.yaml
index 9bba833..d19c8f8 100644
--- a/helm/openwhisk/values.yaml
+++ b/helm/openwhisk/values.yaml
@@ -207,8 +207,9 @@ invoker:
         imagePullPolicy: "IfNotPresent"
         enabled: false
         port: 3233
-  containerNetwork: "bridge"
-  kubeDNS: nil
+    containerNetwork: "bridge"
+    # nameservers is an empty string or a colon separated list of IP addresses of DNS servers.
+    nameservers: ""
 
 # API Gateway configurations
 apigw:


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services