Skip to content
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

Suggestion: refer to label-schema.org for examples of label usage #485

Closed
lizrice opened this issue Dec 8, 2016 · 9 comments
Closed

Suggestion: refer to label-schema.org for examples of label usage #485

lizrice opened this issue Dec 8, 2016 · 9 comments

Comments

@lizrice
Copy link

lizrice commented Dec 8, 2016

Over at label-schema.org we've been reaching a consensus about some common keys for container labels which could be referred to by different tools.

I'm opening this issue to start a discussion about whether the OCI image spec could in some way reference label-schema - perhaps as an example of label key usage? If this is something folks are willing to see added to the spec, I'm more than happy to make a PR.

To be clear: we're not trying to suggest that a container has to have any of these labels! We're envisaging a future where tools extract metadata from a container, so having common keys could save users from having to add duplicate labels with the same information. A reference from the OCI image spec could really help establish the conventions.

Here's a list of public container images published on Docker Hub that are using label-schema labels today.

@vbatts
Copy link
Member

vbatts commented Dec 8, 2016

This SGTM. The conventions laid out in label-schema.org are completely compatible with both the labels in the OCI Image config.md, as well as annotations et al, and to my knowledge do not conflict anywhere.

@jonboulle
Copy link
Contributor

jonboulle commented Dec 8, 2016 via email

@wking
Copy link
Contributor

wking commented Dec 8, 2016 via email

@stevvooe
Copy link
Contributor

I'm not sure that OCI should prefer one labeling schema over another. The image format is not a packaging system and I don't think we should continue to push this idea. As it stands now, labels/annotations have been haphazardly added to the manifest with no thought to how they propagate, what they mean, provenance. Even worse, these get added to containers at runtime with no thought or care to the effect they may have (k8s load balancing?). The idea that one can mine and trust the metadata on hub images eschews any concept of provenance or security (Do I need to demonstrate this or shall I inject some bad data into microscaling.com for you?).

The main issue, as I have explained to @lizrice on many occasions, is that multiple things that are the same will be different because of arbitrary metadata.

The right approach is to have a metadata system that can collect naming, signing and other metadata at a higher-level, referring to the hash directly. This system sits above the existing objects. The provenance is clearer and we don't get the arbitrary mess that comes along with image labels. Such systems could operate independently without stepping on each others toes and without creating massive label bloat. Also, they will actually be secure.

@wking
Copy link
Contributor

wking commented Dec 20, 2016 via email

@lizrice
Copy link
Author

lizrice commented Dec 20, 2016

There are two independent things here that shouldn't be conflated: one, the security of distribution of metadata, and two, the semantics of the metadata itself. Label-schema doesn’t make any attempt to address the first of those.

There is a logically consistent position that says metadata has no place within the image, or that it should not be defined by the image spec. But as it stands today the image spec already refers to labels and annotations as key-value pairs, so appears to take the position that there are reasons to have metadata included in the image.

In practice people are already using build-time labels today to store various metadata, and label-schema simply comes up with some semantic consistency for it. Those semantics would still be meaningful and useful whatever metadata distribution systems come to pass, and whether the metadata is built into the image or stored independently.

@RobDolinMS
Copy link
Collaborator

@lizrice (et. al.) Would it make sense to reference the @label-schema work hosted at http://label-schema.org/ as an informative reference in the spec?

@duglin
Copy link
Collaborator

duglin commented Apr 18, 2017

OH@OCI F2F: use "title" instead of "name" as a label

@sudo-bmitch
Copy link
Contributor

Doing a bit of house keeping. I believe this was resolved by #676. If that's not the case, feel free to follow up and this can be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants