Skip to content

Commit 08d3736

Browse files
committed
Merge pull request #42 from aweiteka/rhlabels
Red Hat vendor LABEL policy
2 parents f072018 + b5fe675 commit 08d3736

1 file changed

Lines changed: 289 additions & 0 deletions

File tree

vendor/redhat/labels.md

Lines changed: 289 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,289 @@
1+
# Red Hat LABEL Metadata
2+
3+
Red Hat built images will include a fields in the metadata to identify the official primary name, version, etc in the Labels section. This will allow differentiating from alternative tags described below, and reconstruct the authoritative fully qualified URL for a given image.
4+
5+
## Naming and versioning related labels
6+
7+
The Fields are:
8+
9+
* `"architecture"`
10+
* Target hardware architecture the image is built for in the Red Hat terminology inherited from RPM.
11+
* Note: there is an upstream Architecture field, but it uses a different terminology. We should work upstream to sync. For now we have to keep the two fields in sync.
12+
* Right now the value is `"x86_64"`
13+
* `"name"`
14+
* The primary name of the image (relative path without TAG): `PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/ REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
15+
* `"authoritative_source"`
16+
* The authoritative registry in which the image is published. For Red Hat this is `"registry.access.redhat.com"`. This allows e.g. to verify if a newer version is available independent of local tagging.
17+
* For ISVs this is optional.
18+
* `"release"`
19+
* The build of the image, `$IMGBUILD`
20+
* `"vendor"`
21+
* `"Red Hat, Inc."`
22+
* `"version"`
23+
* Version part of the TAG in the primary name, `$COMPVER`
24+
* `"com.redhat.component"`
25+
* The component in Bugzilla or other tracker representing the image. Can be used to file bugs.
26+
27+
To reconstruct the authoritative source for an image, docker pull...
28+
29+
```
30+
$AuthoritativeRegistry/$Name:$Version-$Release
31+
```
32+
33+
Aka:
34+
35+
```
36+
$AuthoritativeRegistry[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]:$COMPVER-$IMGBUILD
37+
```
38+
39+
## Other labels
40+
41+
* `"com.redhat.build_host"`
42+
* The build host used to create an image for internal use and auditability, similar to the use in RPM.
43+
* `"distribution_scope"`
44+
* Scope of intended distribution of the image.
45+
* Possible values
46+
* `private`: No public redistribution intended
47+
* `authoritative_source_only` Redistribution only from the source listed in the `"authoritative_source"` label|
48+
* `restricted` Redistribution only with permission|
49+
* `public` No redistribution limits beyond licenses|
50+
* For Red Hat product images this will be set to `"authoritative_source_only"`
51+
* `"build_date"`
52+
* Date/Time image was built (Optional)
53+
* `"url"` (Optional)
54+
* Url with more information on the image
55+
* `"summary"` (Required)
56+
* Short Description of the image
57+
* `"description"` (Optional)
58+
* Detailed description of the image
59+
* `"vcs_type"` (Optional)
60+
* The type of version control used by the container source. Generally one of git, hg, svn, bzr, cvs
61+
* `"vcs_url"` (Optional)
62+
* URL of the version control repository
63+
* `"vcs_ref"` (Optional)
64+
* A 'reference' within the version control repository; e.g. a git commit, or a subversion branch
65+
66+
### Examples
67+
68+
1. `registry.access.redhat.com/rhel7/rhel:7.1-4` has the following metadata:
69+
70+
"Labels": {
71+
"architecture": "x86_64",
72+
"authoritative_source:" "registry.access.redhat.com",
73+
"com.redhat.build_host": "rcm-img04.build.eng.bos.redhat.com",
74+
"com.redhat.component": "rhel-server-docker",
75+
"name": "rhel7/rhel",
76+
"release": "4",
77+
"vendor": "Red Hat, Inc.",
78+
"version": "7.1",
79+
"summary":"RHEL 7 base platform image",
80+
"distribution_scope":"authoritative_source_only"
81+
},
82+
83+
1. `registry.access.redhat.com/rhel7/rsyslog:7.1-4` has the following metadata:
84+
85+
"Labels": {
86+
"architecture": "x86_64",
87+
"authoritative_source": "registry.access.redhat.com"
88+
"com.redhat.build_host": "rcm-img04.build.eng.bos.redhat.com",
89+
"com.redhat.component": "rsyslog-docker",
90+
"name": "rhel7/rsyslog",
91+
"release": "4",
92+
"vendor": "Red Hat, Inc.",
93+
"version": "7.1",
94+
"summary":"RHEL 7 rsyslog application image",
95+
"distribution_scope":"authoritative_source_only"
96+
},
97+
98+
1. `registry.access.redhat.com/rhel7/php-5.4.16-3` has the following metadata:
99+
100+
"Labels": {
101+
"architecture": "x86_64",
102+
"authoritative_source": "registry.access.redhat.com"
103+
"com.redhat.build_host": "rcm-img04.build.eng.bos.redhat.com",
104+
"com.redhat.component": "php-docker",
105+
"name": "rhel7/php",
106+
"release": "3",
107+
"vendor": "Red Hat, Inc.",
108+
"version": "5.4.16",
109+
"summary": "Multiple",
110+
"summary":"RHEL 7 based PHP platform image",
111+
"distribution_scope":"authoritative_source_only"
112+
},
113+
114+
## Primary Product Images in library/
115+
116+
In *addition*, primary product images for our core products will be created in the `library/` namspace to allow direct pull from `redhat.io/REPO` similar to the existing redirects from Docker. This includes an aggregate rhel repository with multiple majors. Note, this is a simple tag model.
117+
118+
Primary product images are images that for convenience and positioning purposes we want to be able to pull directly from `redhat.io/REPO` and redirected from `docker.io/redhat/REPO` or even `docker.io/REPO`.
119+
120+
Examples:
121+
122+
```
123+
registry.access.redhat.com/rhel:7.0-23
124+
registry.access.redhat.com/rhel:6.5-12
125+
registry.access.redhat.com/rhel7:7.0-23
126+
registry.access.redhat.com/rhel6:6.5-12
127+
registry.access.redhat.com/rhel-tools:7.0-5
128+
```
129+
130+
Primary images are the name-giving core images for official Red Hat products as well as select images that are key for the operation of the containerized platform. Example list:
131+
132+
```
133+
rhel
134+
rhel6
135+
rhel7
136+
rhel-tools
137+
```
138+
139+
The `/redhat` namespace will be set up to redirect to `/library`
140+
141+
One thing to keep in mind is that the `:TAG` part is not regularirly used by most users. Only users who very specifically care about using certain versions will use it, or users wanting to find out what exactly they are using in their builds. The vast majority of users will rely on the REPO part of the url before the ':'.
142+
143+
**Note:** The example used above of having a `/rhel` repo, that includes both, rhel7 and rhel6 images is probably not going to work in the current layout of Crane/CDN on the Red Hat registry. So for now `/library/rhel` is simply `rhel7`.
144+
145+
## Latest TAG
146+
147+
The `:latest` tag will always be set to the highest version image in the repository. In cases of multi-major-version repositories this is the newest GA image in the newest major. E.g. `/library/rhel:latest` would point to the newest RHEL 7 image.
148+
149+
## Compatibility TAGs
150+
151+
Until an automatic redirect solution can be implemented, or the approach can be phased out Red Hat will carry a number of additional TAGs for compatibility: `/redhat/*` for the existing redirect from docker.io.
152+
153+
## Beta Releases
154+
155+
Beta releases will be treated as separate 'generations' at the first level. Example:
156+
157+
```
158+
rhel8-beta/rhel:8beta-$IMGBUILD
159+
rhel8-beta/rhel-tools:8beta-$IMGBUILD
160+
rhel8-beta/rsyslog:VERSION-$IMGBUILD
161+
rhel8-beta/php...
162+
...
163+
```
164+
165+
## Bugzilla Mapping
166+
167+
```
168+
REGISTRY/
169+
PRODUCT$PRODUCTGEN[--$PLATFORMDIFFERENTIATOR]/
170+
REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]
171+
:$COMPVER-$IMGBUILD
172+
```
173+
174+
The mapping to Bugzilla (or Jira) components will follow REPO-docker within the respective product. Details as follows:
175+
176+
177+
* `REGISTRY` Ignored in Bugzilla
178+
* `PRODUCT[$PRODUCTGEN]` Maps to the product/version in Bugzilla, other metadata such as
179+
* `REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
180+
* `REPO[$CONTENTGENERATION]` maps to the component with -docker appended
181+
* `PLATFORMDIFFERNTIATOR` is not part of the formal mapping
182+
* `:$COMPVER` Maps to the version of the component
183+
* `-$IMGBUILD` is not part of the formal mapping
184+
185+
Examples:
186+
187+
```
188+
registry.access.redhat.com/rhel7/php:5.4.16-3
189+
```
190+
191+
maps to
192+
193+
* Product: RHEL
194+
* Version: 7.0
195+
* Component: php-docker
196+
197+
## ISV Namespaces
198+
199+
### Registries and Repositories
200+
201+
Certified ISV content will live in per-isv registries, federated in the search. The default namespaces is:
202+
203+
```
204+
registry-$ISV.rhcloud.com/library/REPO
205+
```
206+
207+
In the future ISV images may be permitted to be hosted in 3rd party registries, pending agreement on rules for that.
208+
209+
The ISV can add other urls but only the above will be federated in docker pull w/o explicit repository label (see redirect below).
210+
211+
The naming scheme for ISV images should follow the practice established above.
212+
213+
A key point is, that ISV images provided for RHEL must carry a reference to the Red Hat platform in their tag either in the first or second level of the path.
214+
215+
**Option 1**: level1 of the path
216+
217+
```
218+
docker.io/$PRODUCT[$PRODUCTGEN]--$PLATFORMDIFFERENTIATOR/$REPO[$PRODUCTGEN]:$VERSION-$BUILD
219+
```
220+
221+
**Option 2**: level2 of the path
222+
223+
```
224+
docker.io/$ISVUSER/$PRODUCT[$PRODUCTGEN]--$PLATFORMDIFFERENTIATOR:$VERSION-$BUILD
225+
docker.io/library/$PRODUCT[$PRODUCTGEN]--$PLATFORMDIFFERENTIATOR:$VERSION-$BUILD
226+
```
227+
228+
Examples:
229+
230+
**Option 1** is recommended for products with multiple container images for a specific platform. **Option 2** is recommended for ISVs supporting multiple platforms with a single product and few images.
231+
232+
```
233+
docker.io/kollab14--rhel7/kollab:14.0-23
234+
docker.io/10gen/mongo--rhel7:2.4.9-8
235+
docekr.io/mongo--rhel7:2.4.9-8
236+
```
237+
238+
The `PLATFORMDIFFERENTIATOR` may only be at the major release level. E.g. `mongo--rhel7.1:2.4.9-8` would *NOT* be permissable.
239+
240+
The exception to this would be an image built for an advanced life cycle stream such as EUS, that actually is specific to the individual minor release.
241+
242+
Please note, that at this point Red Hat has *no* plans to actually offer any images for advanced life cycle offerings. ISVs would require a special agreement allowing them to do that on their own.
243+
244+
### ISV Metadata
245+
246+
Red Hat uses the LABEL metadata field to provide additional information for images. All LABELs that are not actively used by the ISV must be overwritten with "". The following labels must be set appropriately to pass certification:
247+
248+
* `"name"`
249+
* The primary name of the image (relative path w/o TAG): `PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR] /REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
250+
* `"release"`
251+
* The build of the image, `$IMGBUILD`
252+
* `"vendor"`
253+
* Name of the ISV
254+
* `"version"`
255+
* Version part of the TAG in the primary name.
256+
* `"authoritative_source"`
257+
* The official registry the ISV is publishing the images to.
258+
* `"distribution_scope"`
259+
* Distribution scope for the image
260+
261+
Any vendor specific LABELS, `'com.redhat.*'`, must be blanked out.
262+
263+
## Global Namespaces
264+
265+
Global namespaces will be segmented by the registry name:
266+
267+
```
268+
redhat.io/* (a.k.a. registry.access.redhat.com/*)
269+
registry-$ISV.rhcloud.com/*
270+
docker.io/*
271+
quay.io/*
272+
```
273+
274+
The Red Hat search should explicitly list the registries for images it lists (at this point redhat.io & registry-$ISV.rhcloud.com).
275+
276+
We are in discussions with Docker on how to federate our content into their search.
277+
278+
## V2 Protocol
279+
280+
The work on defining the V2 protocol and repostitory/image format is ongoing. The naming model is expected to change with the introduction of V2.
281+
282+
## Red Hat Software Collections Containers and Labels
283+
284+
TBA
285+
286+
## Red Hat Middleware Image Naming
287+
288+
TBA
289+

0 commit comments

Comments
 (0)