From cb032b00de65fd983be5ef2e0f780cdba5c84f51 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Sat, 30 Jan 2021 15:08:48 +0000 Subject: [PATCH 1/2] Set hostname to Kubernetes node name This will allow the app to match up data from node and cluster probes --- examples/k8s/ds.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/k8s/ds.yaml b/examples/k8s/ds.yaml index 0193db69c1..6401da6748 100644 --- a/examples/k8s/ds.yaml +++ b/examples/k8s/ds.yaml @@ -31,6 +31,11 @@ spec: - '--probe.docker.bridge=docker0' - '--probe.docker=true' - 'weave-scope-app.weave.svc.cluster.local.:80' + env: + - name: SCOPE_HOSTNAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName image: weaveworks/scope:1.13.1 imagePullPolicy: IfNotPresent resources: From c86021ec056e0393bfe2d756c2209d09503c1875 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Sat, 30 Jan 2021 15:37:56 +0000 Subject: [PATCH 2/2] Stop shellcheck warning on 'echo -v' Non-portability is unlikely to be a problem --- scope | 1 + 1 file changed, 1 insertion(+) diff --git a/scope b/scope index 8295c06a1d..96c52d269d 100755 --- a/scope +++ b/scope @@ -170,6 +170,7 @@ docker_args() { -v /var/run/docker.sock:/var/run/docker.sock \ -v /sys/kernel/debug:/sys/kernel/debug \ -e CHECKPOINT_DISABLE + # shellcheck disable=SC2039 [ -n "${PLUGINS_DIR_EXISTS:-}" ] && echo -v /var/run/scope/plugins:/var/run/scope/plugins }