Skip to content

Commit 3813419

Browse files
committed
Add specification for RHSCL and several labels that we already use in RHSCL
Add example covering the above This is a bit related to #57
1 parent 9664236 commit 3813419

2 files changed

Lines changed: 82 additions & 10 deletions

File tree

vendor/redhat/labels.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The Fields are:
1111
* 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.
1212
* Right now the value is `"x86_64"`
1313
* `"name"`
14-
* The primary name of the image (relative path without TAG): `PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/ REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
14+
* The primary name of the image (relative path without TAG): `PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/ REPO[--$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
1515
* `"authoritative-source"`
1616
* 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.
1717
* For ISVs this is optional.
@@ -33,7 +33,7 @@ $authoritative-source/$name:$version-$release
3333
Aka:
3434

3535
```
36-
$authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]:$COMPVER-$IMGBUILD
36+
$authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REPO[--$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]:$COMPVER-$IMGBUILD
3737
```
3838

3939
## Other labels
@@ -62,6 +62,14 @@ $authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REP
6262
* URL of the version control repository
6363
* `"vcs-ref"` (Optional)
6464
* A 'reference' within the version control repository; e.g. a git commit, or a subversion branch
65+
* `"io.k8s.description"` (Optional)
66+
* Description of the container displayed in Kubernetes
67+
* `"io.k8s.display-name"` (Optional)
68+
* Name of the container displayed in Kubernetes
69+
* `"io.openshift.expose-services"` (Optional)
70+
* port:service pairs separated with comma, e.g. `"8080:http,8443:https"`
71+
* `"io.openshift.tags"` (Optional)
72+
* tags used by searching engine, e.g. `"builder,php,php56,rh-php56"`
6573

6674
### Examples
6775

@@ -106,9 +114,28 @@ $authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REP
106114
"release": "3",
107115
"vendor": "Red Hat, Inc.",
108116
"version": "5.4.16",
109-
"summary": "Multiple",
110117
"summary":"RHEL 7 based PHP platform image",
111118
"distribution-scope":"authoritative-source-only"
112119
},
113120

121+
1. `registry.access.redhat.com/rhscl/php-56-rhel7:5.6-3` has the following metadata:
122+
123+
"Labels": {
124+
"architecture": "x86_64",
125+
"authoritative-source": "registry.access.redhat.com"
126+
"com.redhat.build-host": "rcm-img04.build.eng.bos.redhat.com",
127+
"com.redhat.component": "rh-php56-docker",
128+
"name": "rhscl/php-56-rhel7",
129+
"release": "3",
130+
"vendor": "Red Hat, Inc.",
131+
"version": "5.6",
132+
"summary": "PHP 5.6 platform for building and running applications",
133+
"distribution-scope": "authoritative-source-only",
134+
"url": "http://github.com/sclorg/rhscl-dockerfiles",
135+
"io.k8s.description="Platform for building and running PHP 5.6 applications",
136+
"io.k8s.display-name="Apache 2.4 with PHP 5.6",
137+
"io.openshift.expose-services="8080:http",
138+
"io.openshift.tags="builder,php,php56,rh-php56"
139+
},
140+
114141

vendor/redhat/names.md

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The spaces (" "s) after the are just for formating and not part of the actual sc
8989
* $CONTENTGENERATION
9090
* Optional number differentiating major generational changes withing the primary content that are significant for the use (ie the developer of a layered image). Example: python vs python-33, ruby-193 vs ruby-200.
9191
* $PLATFORMDIFFERENTIATOR
92-
* Optional field to differentiate builds of higher-level images based on the underlying platform generation. Example: SCL ruby200 built on RHEL 6 base vs RHEL 7 - the issue here is, that behavior of the whole stack is sufficiently different, so that as a developer I want to explicitly track (code may break in the move). We can't just track this in the TAG because the FROM line sets the base implicitly in the static linking model.
92+
* Optional field to differentiate builds of higher-level images based on the underlying platform generation. Example: SCL ruby-200 built on RHEL 6 base vs RHEL 7 - the issue here is, that behavior of the whole stack is sufficiently different, so that as a developer I want to explicitly track (code may break in the move). We can't just track this in the TAG because the FROM line sets the base implicitly in the static linking model.
9393
* $COMPVER
9494
* Version string of the primary component without the build part of the rpm. For core RHEL platform images this is the release version string, for e.g. php it would be right now be '5.4.16' based on 'php-5.4.16-23.rhel7_0.3'.x86_64.rpm. For different frames of reference (aka non-RHEL), this would follow a different model depending what makes sense for the repsective product..
9595
* $IMGBUILD
@@ -192,7 +192,7 @@ rhel8-beta/php...
192192
```
193193
REGISTRY/
194194
PRODUCT$PRODUCTGEN[--$PLATFORMDIFFERENTIATOR]/
195-
REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]
195+
REPO[--$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]
196196
:$COMPVER-$IMGBUILD
197197
```
198198

@@ -201,8 +201,8 @@ The mapping to Bugzilla (or Jira) components will follow REPO-docker within the
201201

202202
* `REGISTRY` Ignored in Bugzilla
203203
* `PRODUCT[$PRODUCTGEN]` Maps to the product/version in Bugzilla, other metadata such as
204-
* `REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
205-
* `REPO[$CONTENTGENERATION]` maps to the component with -docker appended
204+
* `REPO[--$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
205+
* `REPO[--$CONTENTGENERATION]` maps to the component with -docker appended
206206
* `PLATFORMDIFFERNTIATOR` is not part of the formal mapping
207207
* `:$COMPVER` Maps to the version of the component
208208
* `-$IMGBUILD` is not part of the formal mapping
@@ -215,7 +215,7 @@ registry.access.redhat.com/rhel7/php:5.4.16-3
215215

216216
maps to
217217

218-
* Product: RHEL
218+
* Product: Red Hat Enterprise Linux 7
219219
* Version: 7.0
220220
* Component: php-docker
221221

@@ -271,7 +271,7 @@ Please note, that at this point Red Hat has *no* plans to actually offer any ima
271271
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:
272272

273273
* `"name"`
274-
* The primary name of the image (relative path w/o TAG): `PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR] /REPO[$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
274+
* The primary name of the image (relative path w/o TAG): `PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR] /REPO[--$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
275275
* `"release"`
276276
* The build of the image, `$IMGBUILD`
277277
* `"vendor"`
@@ -306,7 +306,52 @@ The work on defining the V2 protocol and repository/image format is ongoing. The
306306

307307
## Red Hat Software Collections Containers and Labels
308308

309-
TBA
309+
Red Hat Software Collections containers use the following values:
310+
311+
* $PRODUCT: rhscl
312+
* $PRODUCTGEN: not specified, since RHSCL 1.x and RHSCL 2.x content space is shared
313+
* $REPO: name of the Software Collection without vendor prefix (`rh` is already used in the PRODUCT part, so no need to duplicate)
314+
* $CONTENTGENERATION: part of the main component version, that is related to API stability
315+
* for example `rh-php56` collection will use 56 as $CONTENTGENERATION
316+
* $PLATFORMDIFFERENTIATOR: RHEL version that the collection is based on; e.g. rhel6, rhel7, ...
317+
* $COMPVER: part of the main component version, that is related to API stability
318+
* for example `rh-php56` collection will use 56 as $COMPVER
319+
* $IMGBUILD: build of the image, usually increasing integer
320+
321+
### Beta Releases
322+
323+
Beta releases will be treated as separate 'generations' at the first level. Example:
324+
325+
```
326+
rhscl_beta/php-56-rhel7:5.6-3
327+
rhscl_beta/postgresql-94-rhel7:9.4-1
328+
...
329+
```
330+
331+
332+
### Bugzilla Mapping
333+
334+
The following rules are used for Bugzilla mapping in Red Hat Software Collections:
335+
336+
* `REGISTRY` Ignored in Bugzilla
337+
* `PRODUCT[$PRODUCTGEN]` is not part of the formal mapping
338+
* `REPO[--$CONTENTGENERATION][--$PLATFORMDIFFERENTIATOR]`
339+
* `REPO[--$CONTENTGENERATION]` maps to the Software Collection name with -docker appended
340+
* `PLATFORMDIFFERNTIATOR` is not part of the formal mapping
341+
* `:$COMPVER` Maps to the Software Collection name and is used in version field in Bugzilla
342+
* `-$IMGBUILD` is not part of the formal mapping
343+
344+
Examples:
345+
```
346+
registry.access.redhat.com/rhscl/php-56-rhel7:5.6-3
347+
```
348+
349+
maps to
350+
351+
* Product: Red Hat Software Collections
352+
* Component: rh-php56-docker
353+
* Version: rh-php56
354+
310355

311356
## Red Hat Middleware Image Naming
312357

0 commit comments

Comments
 (0)