Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Had to add a couple extra mounts to get MetricBeat to pick up all the… #314

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions metricbeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ spec:
- name: varrundockersock
hostPath:
path: /var/run/docker.sock
- name: proc
hostPath:
path: /proc
- name: cgroup
hostPath:
path: /sys/fs/cgroup
{{- if .Values.extraVolumes }}
{{ tpl .Values.extraVolumes . | indent 6 }}
{{ toYaml .Values.extraVolumes | indent 6 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -140,6 +146,12 @@ spec:
- name: varrundockersock
mountPath: /var/run/docker.sock
readOnly: true
- name: proc
mountPath: /hostfs/proc
readOnly: true
- name: cgroup
mountPath: /hostfs/sys/fs/cgroup
readOnly: true
{{- if .Values.extraVolumeMounts }}
{{ tpl .Values.extraVolumeMounts . | indent 8 }}
{{ toYaml .Values.extraVolumeMounts | indent 8 }}
{{- end }}
4 changes: 2 additions & 2 deletions metricbeat/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ spec:
name: {{ template "fullname" . }}-config
{{- end }}
{{- if .Values.extraVolumes }}
{{ tpl .Values.extraVolumes . | indent 6 }}
{{ toYaml .Values.extraVolumes | indent 6 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down Expand Up @@ -115,5 +115,5 @@ spec:
subPath: {{ $path }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{ tpl .Values.extraVolumeMounts . | indent 8 }}
{{ toYaml .Values.extraVolumeMounts | indent 8 }}
{{- end }}
5 changes: 2 additions & 3 deletions metricbeat/tests/metricbeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import sys
sys.path.insert(1, os.path.join(sys.path[0], '../../helpers'))
from helpers import helm_template
import yaml

project = 'metricbeat'
name = 'release-name-' + project
Expand Down Expand Up @@ -166,10 +165,10 @@ def test_adding_a_secret_mount():

def test_adding_a_extra_volume_with_volume_mount():
config = '''
extraVolumes: |
extraVolumes:
- name: extras
emptyDir: {}
extraVolumeMounts: |
extraVolumeMounts:
- name: extras
mountPath: /usr/share/extras
readOnly: true
Expand Down
4 changes: 2 additions & 2 deletions metricbeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ extraEnvs: []
# - name: MY_ENVIRONMENT_VAR
# value: the_value_goes_here

extraVolumeMounts: ""
extraVolumeMounts: []
# - name: extras
# mountPath: /usr/share/extras
# readOnly: true

extraVolumes: ""
extraVolumes: []
# - name: extras
# emptyDir: {}

Expand Down