mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
More sensible container names for Mesos/Marathon (#1316)
* Collect container environment variales (close #1314) * Containers managed by Marathon can have meaningful names (close #1309) * Make linter happy and fix tests
This commit is contained in:
committed by
Tom Wilkie
parent
49f79649ed
commit
a49c3893de
@@ -26,6 +26,7 @@ const (
|
||||
// Keys we use to render container names
|
||||
AmazonECSContainerNameLabel = "com.amazonaws.ecs.container-name"
|
||||
KubernetesContainerNameLabel = "io.kubernetes.container.name"
|
||||
MarathonAppIDEnv = "MARATHON_APP_ID"
|
||||
)
|
||||
|
||||
// NodeSummaryGroup is a topology-typed group of children for a Node.
|
||||
@@ -370,6 +371,9 @@ func getRenderableContainerName(nmd report.Node) string {
|
||||
// is only provided by Kubernetes versions >= 1.2 (see
|
||||
// https://github.com/kubernetes/kubernetes/pull/17234/ )
|
||||
docker.LabelPrefix + KubernetesContainerNameLabel,
|
||||
// Marathon doesn't set any Docker labels and this is the only meaningful
|
||||
// attribute we can find to make Scope useful without Mesos plugin
|
||||
docker.EnvPrefix + MarathonAppIDEnv,
|
||||
docker.ContainerName,
|
||||
docker.ContainerHostname,
|
||||
} {
|
||||
|
||||
Reference in New Issue
Block a user