From 5629fef4a3a762f2218d053d8937ebe8d1065e65 Mon Sep 17 00:00:00 2001 From: Aaron Weitekamp Date: Thu, 21 Apr 2016 12:32:42 -0400 Subject: [PATCH 1/2] add openshift labels for app deployment --- vendor/redhat/labels.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vendor/redhat/labels.md b/vendor/redhat/labels.md index a9418ba..7eb173a 100644 --- a/vendor/redhat/labels.md +++ b/vendor/redhat/labels.md @@ -45,6 +45,10 @@ $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 @@ -112,5 +116,3 @@ $authoritative-source[:PORT]/PRODUCT[$PRODUCTGEN][--$PLATFORMDIFFERENTIATOR]/REP "io.openshift.expose-services="8080:http", "io.openshift.tags="builder,php,php56,rh-php56" }, - - From 0db2c0ef298d77995dc1e1736754f62fdf80d3a0 Mon Sep 17 00:00:00 2001 From: Aaron Weitekamp Date: Mon, 2 May 2016 13:53:12 -0400 Subject: [PATCH 2/2] Use config.env for parameterization config --- README.md | 21 ++++++++++++++++++--- vendor/redhat/labels.md | 6 ++---- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9ce5fb9..4c0d8c1 100644 --- a/README.md +++ b/README.md @@ -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 | |-------------|----------------------------------------| @@ -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 | |-------------|-------------| @@ -55,11 +56,25 @@ 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` diff --git a/vendor/redhat/labels.md b/vendor/redhat/labels.md index 7eb173a..a9418ba 100644 --- a/vendor/redhat/labels.md +++ b/vendor/redhat/labels.md @@ -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 @@ -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" }, + +