From 55dbc4402f69a508e0ad4f3029b7c9eb82e00386 Mon Sep 17 00:00:00 2001 From: Oron Gola Date: Fri, 12 Jun 2020 02:02:44 +0300 Subject: [PATCH 1/2] [filebeat] introduce dnsConfig values for the containers Signed-off-by: Oron Gola --- filebeat/README.md | 2 ++ filebeat/templates/daemonset.yaml | 3 +++ filebeat/values.yaml | 1 + 3 files changed, 6 insertions(+) diff --git a/filebeat/README.md b/filebeat/README.md index 50376e56e..a610149ec 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -116,6 +116,7 @@ as a reference. They are also used in the automated testing of this chart. | `filebeatConfig` | Allows you to add any config files in `/usr/share/filebeat` such as `filebeat.yml` | see [values.yaml][] | | `fullnameOverride` | Overrides the full name of the resources. If not set the name will default to " `.Release.Name` - `.Values.nameOverride or .Chart.Name` " | `""` | | `hostNetworking` | Use host networking in the DaemonSet so that hostname is reported correctly | `false` | +| `dnsConfig` | Configurable [dnsConfig][] | `{}` | | `hostPathRoot` | Fully-qualified [hostPath][] that will be used to persist Filebeat registry data | `/var/lib` | | `imagePullPolicy` | The Kubernetes [imagePullPolicy][] value | `IfNotPresent` | | `imagePullSecrets` | Configuration for [imagePullSecrets][] so that you can use a private registry for your image | `[]` | @@ -192,6 +193,7 @@ about our development and testing process. [filebeat oss docker image]: https://www.docker.elastic.co/#filebeat-7-7-0-oss [helm]: https://helm.sh [hostNetwork]: https://kubernetes.io/docs/concepts/policy/pod-security-policy/#host-namespaces +[dnsConfig]: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/ [hostPath]: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath [imagePullPolicy]: https://kubernetes.io/docs/concepts/containers/images/#updating-images [imagePullSecrets]: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/#create-a-pod-that-uses-your-secret diff --git a/filebeat/templates/daemonset.yaml b/filebeat/templates/daemonset.yaml index dbd446748..4b9c411b8 100644 --- a/filebeat/templates/daemonset.yaml +++ b/filebeat/templates/daemonset.yaml @@ -56,6 +56,9 @@ spec: hostNetwork: true dnsPolicy: ClusterFirstWithHostNet {{- end }} + {{- if .Values.dnsConfig }} + dnsConfig: {{ toYaml .Values.dnsConfig | nindent 8 }} + {{- end }} volumes: {{- range .Values.secretMounts }} - name: {{ .name }} diff --git a/filebeat/values.yaml b/filebeat/values.yaml index 5118993bd..475e0e8a1 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -51,6 +51,7 @@ envFrom: [] # Root directory where Filebeat will write data to in order to persist registry data across pod restarts (file position and other metadata). hostPathRoot: /var/lib hostNetworking: false +dnsConfig: {} image: "docker.elastic.co/beats/filebeat" imageTag: "7.7.1" imagePullPolicy: "IfNotPresent" From 25bce762144063c764e34eabe470447019003d04 Mon Sep 17 00:00:00 2001 From: orong-pp <35888887+orong-pp@users.noreply.github.com> Date: Mon, 5 Oct 2020 03:45:53 +0300 Subject: [PATCH 2/2] add example for dnsConfig value Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> --- filebeat/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/filebeat/values.yaml b/filebeat/values.yaml index 475e0e8a1..369e5e6da 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -52,6 +52,9 @@ envFrom: [] hostPathRoot: /var/lib hostNetworking: false dnsConfig: {} +# options: +# - name: ndots +# value: "2" image: "docker.elastic.co/beats/filebeat" imageTag: "7.7.1" imagePullPolicy: "IfNotPresent"