From 288171ff8ff9af81601dfc50abb9c028ae1781ea Mon Sep 17 00:00:00 2001 From: orong-pp <35888887+orong-pp@users.noreply.github.com> Date: Mon, 5 Oct 2020 14:02:19 +0300 Subject: [PATCH] [filebeat] introduce dnsConfig values for the containers (#659) Co-authored-by: Julien Mailleret <8582351+jmlrt@users.noreply.github.com> --- filebeat/README.md | 2 ++ filebeat/templates/daemonset.yaml | 3 +++ filebeat/values.yaml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/filebeat/README.md b/filebeat/README.md index 339cfb1b5..05a46adc9 100644 --- a/filebeat/README.md +++ b/filebeat/README.md @@ -103,6 +103,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 | `[]` | @@ -204,6 +205,7 @@ about our development and testing process. [helm]: https://helm.sh [helm 3 (beta)]: https://github.com/elastic/helm-charts/tree/master/README.md#helm-3-beta [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 1cf3106e5..94e286bdf 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 fbb26ece5..3b2042660 100755 --- a/filebeat/values.yaml +++ b/filebeat/values.yaml @@ -51,6 +51,10 @@ 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: {} +# options: +# - name: ndots +# value: "2" image: "docker.elastic.co/beats/filebeat" imageTag: "7.10.0-SNAPSHOT" imagePullPolicy: "IfNotPresent"