This is an automated email from the ASF dual-hosted git repository.
daisyguo pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/incubator-openwhisk-deploy-kube.git
The following commit(s) were added to refs/heads/master by this push:
new 8b04d23 Add entry to values.yaml to configure Kubernetes DNS service
(#319)
8b04d23 is described below
commit 8b04d233d12f109a2d2b3362c651302272beae39
Author: David Grove <[email protected]>
AuthorDate: Tue Oct 23 08:30:16 2018 -0400
Add entry to values.yaml to configure Kubernetes DNS service (#319)
Fixes #303
Fixes #311
---
docs/troubleshooting.md | 15 ++++++++++++++-
helm/openwhisk/templates/nginxConfigMap.yaml | 2 +-
helm/openwhisk/values.yaml | 10 ++++++----
3 files changed, 21 insertions(+), 6 deletions(-)
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