Bug 1380791

Summary: Support for namespace labels mapping to env variables in downward API
Product: OpenShift Container Platform Reporter: Eric Jones <erjones>
Component: RFEAssignee: Derek Carr <decarr>
Status: CLOSED DEFERRED QA Contact: Johnny Liu <jialiu>
Severity: high Docs Contact:
Priority: high    
Version: 3.3.0CC: aos-bugs, bandrade, erjones, javier.ramirez, jokerman, mbarrett, mmccomas, pmorie, simon.gunzenreiner, vwalek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-12 13:54:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Eric Jones 2016-09-30 14:35:36 UTC
- What is the nature and description of the request? 
We would like to consume namespace or project labels via the downward API in Containers through environment variables. Mapping labels to environment variables is currently not supported (https://docs.openshift.com/container-platform/3.3/dev_guide/downward_api.html#selecting-fields)

- Why does the customer need this? (List the business requirements here) 
It will be very interesting to make the provided images better parameterizable. Often, it will be the platform provider that wants to provide parameterization via project / namespace labels. 
One use case for this is the Java/Maven S2I builder image. As a platform provider, we would like to provide & configure project specific library repositories. To make it convenient for developers, we would like to provide the URL to the various repositories (proxy, snapshot, release) through labels on the project. Any builder image that is interested in this information could declare this, and would get these variables "injected". If OpenShift would standardize on certain variables, OpenShift images could even be prepared for this case, so that customer platform admins don't need to re-build the OpenShift provided images just to add this level of build support.

- How would the customer like to achieve this? (List the functional requirements here) 
We envisage that it should be quite simple to extend the current mechanism to support this scenario. Instead of just referring to "label", one should be able to navigate into the label section by naming labels:
      env:
        - name: RELEASE_REPO_URL
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace.labels:mycompany.com/maven_release_repo_url

- Is there already an existing RFE upstream or in Red Hat Bugzilla?
Unclear but could not find anything

Comment 13 Eric Rich 2018-03-12 13:54:36 UTC
This bug has been identified as a dated (created more than 3 months ago) bug. 
This bug has been triaged (has a trello card linked to it), or reviewed by Engineering/PM and has been put into the product backlog, 
however this bug has not been slated for a currently planned release (3.9, 3.10 or 3.11), which cover our releases for the rest of the calendar year. 

As a result of this bugs age, state on the current roadmap and PM Score (being below 70), this bug is being Closed - Differed, 
as it is currently not part of the products immediate priorities.

Please see: https://docs.google.com/document/d/1zdqF4rB3ea8GmVIZ7qWCVYUaQ7-EexUrQEF0MTwdDkw/edit for more details.