Skip to content

Commit 84a6933

Browse files
committed
Use config.env for parameterization config
1 parent 5629fef commit 84a6933

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The following types of data are being considered:
2626
| stop | Command to execute before stopping container|
2727
| debug | Command to run the image with debugging turned on|
2828

29-
2. Labels Names used to describe the application/image
29+
1. Labels Names used to describe the application/image
3030

3131
| Name | Description |
3232
|-------------|----------------------------------------|
@@ -45,8 +45,9 @@ The following types of data are being considered:
4545
| authoritative-source-url | The authoritative location in which the image is published|
4646
| distribution-scope | Intended scope of distribution for image (see below for possible values)|
4747
| changelog-url | URL of a page containing release notes for the image|
48+
| config | A namespace for defining the application configuration (see below for possible values)|
4849

49-
3. Possible values of distribution-scope field
50+
1. Possible values of distribution-scope field
5051

5152
|Name | Description |
5253
|-------------|-------------|
@@ -55,11 +56,26 @@ The following types of data are being considered:
5556
| restricted | Redistribution only with permission|
5657
| public | No redistribution limits beyond licenses|
5758

58-
4. Custom labels may be defined by a namespace prefix using reverse DNS notation of a domain controlled by the author. For example, `com.redhat.access`.
59+
1. Possible values of config field. Application configuration may be defined or hinted using the config label. This allows documentation and tooling to provide parameterization control. Currently, environment variables are the only parameter, with three attributes.
60+
61+
|Name | Description |
62+
|-------------|-------------|
63+
| config.env.KEY | Default value. Use empty string "" if no default.|
64+
| config.env.KEY.description | Description|
65+
| config.env.KEY.required | Required boolean, true or false.|
66+
Example:
67+
```
68+
LABEL config.env.foo=bar \
69+
config.env.foo.description="Lorem ipsum dolor sit amet" \
70+
config.env.foo.required=true
71+
```
72+
73+
1. Custom labels may be defined by a namespace prefix using reverse DNS notation of a domain controlled by the author. For example, `com.redhat.access`.
5974

6075
LABEL io.openshift.expose-services="8080:http" \
6176
io.openshift.tags="builder,nodejs,nodejs010"
6277

78+
6379
## Details on Labels
6480

6581
## `authoritative-source-url`

vendor/redhat/labels.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ $authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REP
4545
| io.k8s.display-name | no | Name of the container displayed in Kubernetes |
4646
| io.openshift.expose-services | no | port:service pairs separated with comma, e.g. `"8080:http,8443:https"` |
4747
| io.openshift.tags | no | tags used by searching engine, e.g. `"builder,php,php56,rh-php56"` |
48-
| io.openshift.env-KEY | no | Required environment variable. Creates parameter named "KEY". If no value is provided user input required. |
49-
| io.openshift.podhook.pre | no | Pre exec pod-based lifecycle hook command. See [documentation](https://docs.openshift.org/latest/dev_guide/deployments.html#pod-based-lifecycle-hook) |
50-
| io.openshift.podhook.post | no | Post exec pod-based lifecycle hook command. See [documentation](https://docs.openshift.org/latest/dev_guide/deployments.html#pod-based-lifecycle-hook) |
51-
5248

5349
### Examples
5450

@@ -116,3 +112,5 @@ $authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REP
116112
"io.openshift.expose-services="8080:http",
117113
"io.openshift.tags="builder,php,php56,rh-php56"
118114
},
115+
116+

0 commit comments

Comments
 (0)