-
Notifications
You must be signed in to change notification settings - Fork 712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report docker container labels and render them in the details pane #400
Conversation
663545f
to
03c6c01
Compare
Failure is due to
|
@@ -215,6 +223,7 @@ func (c *container) GetNodeMetadata() report.NodeMetadata { | |||
ImageID: c.container.Image, | |||
ContainerIPs: strings.Join(append(c.container.NetworkSettings.SecondaryIPAddresses, | |||
c.container.NetworkSettings.IPAddress), " "), | |||
ContainerLabels: string(labels), |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Also, docker images can have labels, as can the docker daemon. We should probably fetch these and attach them to the docker image and host topology. In which case, make the prefix |
03c6c01
to
e1c0501
Compare
66be8bd
to
d9ab9d8
Compare
@@ -245,6 +248,13 @@ func (c *container) GetNodeMetadata() report.NodeMetadata { | |||
return result | |||
} | |||
|
|||
// ExtractContainerLabels returns the list of Docker container labels given a NodeMetadata from the Container topology. | |||
func ExtractContainerLabels(nmd report.NodeMetadata) map[string]string { | |||
result := make(map[string]string) |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@tomwilkie Unfortunately the fsouza Docker client doesn't support Docker daemon labels yet: see the message from my last commit |
a8c7297
to
fc48de2
Compare
ContainerPorts = "docker_container_ports" | ||
ContainerCreated = "docker_container_created" | ||
ContainerIPs = "docker_container_ips" | ||
ContainerLabelPrefix = "docker_container_label_" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Assign it back to me when the tests pass. |
fc48de2
to
4e2474e
Compare
Daemon labels will have to wait since the go client (Docker API v1.14) doesn't support them yet (daemon labels were exposed in Docker API v1.16) See https://godoc.org/github.com/fsouza/go-dockerclient#Client.Info for details.
4e2474e
to
9ba3740
Compare
LGTM |
Report docker container labels and render them in the details pane
Addresses part of #372