diff --git a/docs_src/tutorials/kubernetes.md b/docs_src/tutorials/kubernetes.md index 3fc5a7fa..50dc76af 100644 --- a/docs_src/tutorials/kubernetes.md +++ b/docs_src/tutorials/kubernetes.md @@ -6,8 +6,11 @@ Scaphandre, Prometheus and Grafana. ## Install Scaphandre First we install Scaphandre which runs as a daemon set which creates a pod on -each node for collecting the metrics. +each node for collecting the metrics. The helm chart is not in a repo, it needs +to be installed from the source code. + git clone https://github.com/hubblo-org/scaphandre + cd scaphandre helm install scaphandre helm/scaphandre ## Install Prometheus diff --git a/helm/scaphandre/templates/daemonset.yaml b/helm/scaphandre/templates/daemonset.yaml index d88b540a..f51767f4 100644 --- a/helm/scaphandre/templates/daemonset.yaml +++ b/helm/scaphandre/templates/daemonset.yaml @@ -20,6 +20,13 @@ spec: - name: {{ template "scaphandre.name" . }} image: "{{ .Values.image.name }}:{{ .Values.image.tag }}" args: + {{- range $key, $value := .Values.scaphandre.args }} + {{- if $value }} + - --{{ $key }}={{ $value }} + {{- else }} + - --{{ $key }} + {{- end }} + {{- end }} - {{ .Values.scaphandre.command }} {{- range $key, $value := .Values.scaphandre.extraArgs }} {{- if $value }} @@ -28,6 +35,11 @@ spec: - --{{ $key }} {{- end }} {{- end }} + env: + {{- if .Values.scaphandre.rustBacktrace }} + - name: RUST_BACKTRACE + value: '{{ .Values.scaphandre.rustBacktrace }}' + {{- end }} ports: - name: metrics containerPort: {{ .Values.port }} diff --git a/helm/scaphandre/values.yaml b/helm/scaphandre/values.yaml index 72aa9c1b..dec4c7ce 100644 --- a/helm/scaphandre/values.yaml +++ b/helm/scaphandre/values.yaml @@ -13,8 +13,10 @@ resources: scaphandre: command: prometheus + args: {} extraArgs: containers: true +# rustBacktrace: '1' # Run as root user to get proper permissions userID: 0