Using container labels
A label is a form of metadata on your container. It comes in the form of a key and value pair.
When you start a container on a machine, you can add multiple labels to the container. But it’s worth noting that they’re static and last throughout the container’s lifetime, which means you can’t change the labels once the container is running.
With our orchestrator, you can pass down a collection of labels to a container through a labels object.
Your custom labels aren’t the only ones our orchestrator passes down to the container. We also include some metadata that anyone with list access can use.
The image itself can also pass down labels when you create it as a container.
If we look at the Dockerfile of nginx, we can clearly see this:
LABEL maintainer="NGINX Docker Maintainers <email@example.com>"
Our API then returns:
"maintainer": "NGINX Docker Maintainers <firstname.lastname@example.org>",.
Within the labels object, all:
- Environment variables are JSON packed inside an env field
- Gameye-defined labels are JSON packed inside a gameye field
- User-defined labels are JSON packed inside a tags field.
Our API lets you filter the list of sessions using the OpenAPI deepObject style:
We only support equality comparisons right now. That means the API can’t filter based on other criteria, like whether the value of a label starts with X or Y. Equality comparisons are also case-sensitive.