Skip to content

Commit

Permalink
Use config.env for parameterization config
Browse files Browse the repository at this point in the history
  • Loading branch information
aweiteka committed May 2, 2016
1 parent 5629fef commit 84a6933
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The following types of data are being considered:
| stop | Command to execute before stopping container|
| debug | Command to run the image with debugging turned on|

2. Labels Names used to describe the application/image
1. Labels Names used to describe the application/image

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

3. Possible values of distribution-scope field
1. Possible values of distribution-scope field

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

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`.
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.

|Name | Description |
|-------------|-------------|
| config.env.KEY | Default value. Use empty string "" if no default.|
| config.env.KEY.description | Description|
| config.env.KEY.required | Required boolean, true or false.|
Example:
```
LABEL config.env.foo=bar \
config.env.foo.description="Lorem ipsum dolor sit amet" \
config.env.foo.required=true
```

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`.

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


## Details on Labels

## `authoritative-source-url`
Expand Down
6 changes: 2 additions & 4 deletions vendor/redhat/labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ $authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REP
| io.k8s.display-name | no | Name of the container displayed in Kubernetes |
| io.openshift.expose-services | no | port:service pairs separated with comma, e.g. `"8080:http,8443:https"` |
| io.openshift.tags | no | tags used by searching engine, e.g. `"builder,php,php56,rh-php56"` |
| io.openshift.env-KEY | no | Required environment variable. Creates parameter named "KEY". If no value is provided user input required. |
| 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) |
| 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) |


### Examples

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


0 comments on commit 84a6933

Please sign in to comment.