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/10/22 20:45:20 UTC

[GitHub] dgrove-oss closed pull request #319: Add entry to values.yaml to configure Kubernetes DNS service

dgrove-oss closed pull request #319: Add entry to values.yaml to configure Kubernetes DNS service
URL: https://github.com/apache/incubator-openwhisk-deploy-kube/pull/319
 
 
   

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/troubleshooting.md b/docs/troubleshooting.md
index 7b1c863..9dc78fc 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -24,7 +24,7 @@ deploying OpenWhisk on Kubernetes and how to correct them.
 
 Verify that you actually have at least one node with the label openwhisk-role=invoker.
 
-### Invokers containers fail to start with volume mounting problems
+### Invoker pods fail to start with volume mounting problems
 
 To execute the containers for user actions, OpenWhisk relies on part
 of the underlying infrastructure that Kubernetes is running on. When
@@ -74,3 +74,16 @@ If you installed self-signed certificates, which is the default
 for the OpenWhisk Helm chart, you will need to use `wsk -i` to
 suppress certificate checking.  This works around `cannot validate
 certificate` errors from the `wsk` CLI.
+
+### nginx pod fails with `host not found in resolver` error
+
+The nginx config map specifies a resolver that is used to resolve references to
+Kubernetes services like the controller and apigateway into ip addresses. By default,
+it uses `kube-dns.kube-system`. If your cluster instead uses `coredns` (or some other
+dns subsystem), you will need to edit the `k8s.dns` entry in values.yaml to
+an appropriate value for your cluster.  A misconfigured resolver will results in
+the nginx pod entering a CrashLoopBackOff with an error message like the one below:
+```
+018/09/27 23:33:48 [emerg] 1#1: host not found in resolver "kube-dns.kube-system" in /etc/nginx/nginx.conf:41
+nginx: [emerg] host not found in resolver "kube-dns.kube-system" in /etc/nginx/nginx.conf:41
+```
diff --git a/helm/openwhisk/templates/nginxConfigMap.yaml b/helm/openwhisk/templates/nginxConfigMap.yaml
index b25140a..f067fb8 100644
--- a/helm/openwhisk/templates/nginxConfigMap.yaml
+++ b/helm/openwhisk/templates/nginxConfigMap.yaml
@@ -51,7 +51,7 @@ data:
         proxy_ssl_verify off;
 
         # Hack to convince nginx to dynamically resolve the dns entries.
-        resolver kube-dns.kube-system;
+        resolver {{ .Values.k8s.dns }};
         set $controllers {{ include "controller_host" . }};
 {{- if or (eq .Values.whisk.ingress.type "NodePort") (eq .Values.whisk.ingress.type "LoadBalancer") }}
         set $apigw {{ include "apigw_host" . }};
diff --git a/helm/openwhisk/values.yaml b/helm/openwhisk/values.yaml
index 7b2b575..34cb6e1 100644
--- a/helm/openwhisk/values.yaml
+++ b/helm/openwhisk/values.yaml
@@ -18,7 +18,7 @@
 # to enable them.
 
 
-# Overall configuration of the deployment
+# Overall configuration of OpenWhisk deployment
 whisk:
   # Ingress defines how to access OpenWhisk from outside the Kubernetes cluster.
   # See docs/ingress.md for a discussion of how to provide these values.
@@ -39,6 +39,11 @@ whisk:
   loadbalancer:
     invokerUserMemory: "2048m"
 
+# Properties of the Kubernetes cluster on which OpenWhisk is being deployed
+k8s:
+  domain: cluster.local
+  dns: kube-dns.kube-system
+
 # Images used to run auxillary tasks/jobs
 utility:
   ansibleRunnerImage: "openwhisk/ansible-runner:latest"
@@ -217,6 +222,3 @@ affinity:
   edgeNodeLabel: edge
   invokerNodeLabel: invoker
   providerNodeLabel: provider
-
-k8s:
-  domain: cluster.local


 

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