From d4db661dae5fa9f8987b5384256d3a0977d3bd47 Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Fri, 31 May 2019 12:51:34 +0200 Subject: [PATCH 1/2] Incorporate pod DNS settings into chart Mainly to provide people with the tools to overcome nslookup issues on certain Kubernetes setups, as one solution seems to be to configure the ndots value to "1". Ref: https://github.com/weaveworks/flux/issues/2051#issuecomment-494040058 --- chart/flux/README.md | 4 ++++ chart/flux/templates/deployment.yaml | 7 +++++++ chart/flux/values.yaml | 8 ++++++++ 3 files changed, 19 insertions(+) diff --git a/chart/flux/README.md b/chart/flux/README.md index 42923e512..70dbfce7b 100755 --- a/chart/flux/README.md +++ b/chart/flux/README.md @@ -194,6 +194,10 @@ The following tables lists the configurable parameters of the Weave Flux chart a | `nodeSelector` | `{}` | Node Selector properties for the Flux deployment | `tolerations` | `[]` | Tolerations properties for the Flux deployment | `affinity` | `{}` | Affinity properties for the Flux deployment +| `extraVolumeMounts` | `[]` | Extra volumes mounts +| `extraVolumes` | `[]` | Extra volumes +| `dnsPolicy` | `` | Pod DNS policy +| `dnsConfig` | `` | Pod DNS config | `token` | `None` | Weave Cloud service token | `extraEnvs` | `[]` | Extra environment variables for the Flux pod(s) | `rbac.create` | `true` | If `true`, create and use RBAC resources diff --git a/chart/flux/templates/deployment.yaml b/chart/flux/templates/deployment.yaml index e40d6c644..33601c3b7 100644 --- a/chart/flux/templates/deployment.yaml +++ b/chart/flux/templates/deployment.yaml @@ -218,6 +218,13 @@ spec: {{ toYaml .Values.additionalArgs | indent 10 }} {{- end }} resources: +{{- if .Values.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy }} +{{- end }} +{{- if .Values.dnsConfig }} + dnsConfig: +{{ toYaml .Values.dnsConfig | indent 8 }} +{{- end }} {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} nodeSelector: diff --git a/chart/flux/values.yaml b/chart/flux/values.yaml index 3e9c3477e..9a037f2f9 100644 --- a/chart/flux/values.yaml +++ b/chart/flux/values.yaml @@ -104,6 +104,14 @@ extraVolumeMounts: [] extraVolumes: [] +# Optional DNS settings, configuring the ndots option may resolve +# nslookup issues on some Kubernetes setups. +# dnsPolicy: "None" +# dnsConfig: +# options: +# - name: ndots +# value: "1" + gpgKeys: # These keys will be imported into GPG in the Flux container. secretName: "" From 9cac55346d31f47a1d2c2962c5a525205cd7457e Mon Sep 17 00:00:00 2001 From: Hidde Beydals Date: Fri, 31 May 2019 12:54:56 +0200 Subject: [PATCH 2/2] Mention pod DNS settings in Flux daemon deployment --- deploy/flux-deployment.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy/flux-deployment.yaml b/deploy/flux-deployment.yaml index a75d636eb..06b2615b1 100644 --- a/deploy/flux-deployment.yaml +++ b/deploy/flux-deployment.yaml @@ -139,3 +139,11 @@ spec: # Serve /metrics endpoint at different port; # make sure to set prometheus' annotation to scrape the port value. - --listen-metrics=:3031 + + # Optional DNS settings, configuring the ndots option may resolve + # nslookup issues on some Kubernetes setups. + # dnsPolicy: "None" + # dnsConfig: + # options: + # - name: ndots + # value: "1"