Unverified Commit ea357a77 authored by alespour's avatar alespour Committed by GitHub

[telegraf-ds] configurable docker plugin socket (#411)

* configurable docker socket * add test values * bump version
parent 4a67a651
apiVersion: v1 apiVersion: v1
name: telegraf-ds name: telegraf-ds
version: 1.0.31 version: 1.0.32
appVersion: 1.21.4 appVersion: 1.21.4
deprecated: false deprecated: false
description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics. description: Telegraf is an agent written in Go for collecting, processing, aggregating, and writing metrics.
......
# Default values only, no overrides
...@@ -34,8 +34,10 @@ data: ...@@ -34,8 +34,10 @@ data:
[[inputs.disk]] [[inputs.disk]]
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
{{- if .Values.config.docker_endpoint }}
[[inputs.docker]] [[inputs.docker]]
endpoint = "unix:///var/run/docker.sock" endpoint = {{ .Values.config.docker_endpoint | quote }}
{{- end }}
[[inputs.kubernetes]] [[inputs.kubernetes]]
url = "https://$HOSTIP:10250" url = "https://$HOSTIP:10250"
......
...@@ -46,8 +46,10 @@ spec: ...@@ -46,8 +46,10 @@ spec:
- name: hostfsro - name: hostfsro
mountPath: /hostfs mountPath: /hostfs
readOnly: true readOnly: true
{{- if hasPrefix "unix" .Values.config.docker_endpoint }}
- name: docker-socket - name: docker-socket
mountPath: /var/run/docker.sock mountPath: {{ trimPrefix "unix://" .Values.config.docker_endpoint }}
{{- end }}
- name: config - name: config
mountPath: /etc/telegraf mountPath: /etc/telegraf
{{- with .Values.nodeSelector }} {{- with .Values.nodeSelector }}
...@@ -66,9 +68,12 @@ spec: ...@@ -66,9 +68,12 @@ spec:
- name: hostfsro - name: hostfsro
hostPath: hostPath:
path: / path: /
{{- if hasPrefix "unix" .Values.config.docker_endpoint }}
- name: docker-socket - name: docker-socket
hostPath: hostPath:
path: /var/run/docker.sock path: {{ trimPrefix "unix://" .Values.config.docker_endpoint }}
type: Socket
{{- end }}
- name: varrunutmpro - name: varrunutmpro
hostPath: hostPath:
path: /var/run/utmp path: /var/run/utmp
......
...@@ -135,3 +135,4 @@ config: ...@@ -135,3 +135,4 @@ config:
user_agent: "telegraf" user_agent: "telegraf"
insecure_skip_verify: false insecure_skip_verify: false
monitor_self: false monitor_self: false
docker_endpoint: "unix:///var/run/docker.sock"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment