Description of problem: Cannot recognize object name which contain "." per bind request: { "description": "FindResults failed on annotation template.openshift.io/expose-special.how: special is not found" } Version-Release number of selected component (if applicable): openshift v3.6.121 kubernetes v1.6.1+5115d708d7 etcd 3.2.0 How reproducible: always Steps to Reproduce: 1.Create a configmap template under test project like below: "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "name": "special-config", "annotations": { "template.openshift.io/expose-how": "{.data['special.how']}", "template.openshift.io/expose-type": "{.data['special.type']}" } }, "data": { "special.how": "${DATA_1}", "special.type": "${DATA_2}" } }], 2. Enable service broker to project test 3. Change namespace and cluster address in shared.shh 4. Change namespace to test in provision.sh and bind.ssh and execute these two scripts Actual results: { "description": "FindResults failed on annotation template.openshift.io/expose-special.how: special is not found" } Expected results: Should return output like below: "credentials": { "special.how": "data1-SJ6", "special.type": "data2-K4E" } Additional info:
Good find. Perhaps I should have evaluated the kubernetes jsonpath implementation more closely before using it - this is a second example of the implementation being a bit shaky. It's not documented upstream, but it looks intended that you can work around this issue by escaping the '.' character as follows: "template.openshift.io/expose-how": "{.data['special\\.how']}", I worry that there'll be no appetite for changing this behaviour upstream; I'm inclined to resolve this bz by adding a note to the documentation. @bparees, what do you think?
I think documenting the need to escape special characters is a fine resolution.
https://github.com/openshift/openshift-docs/pull/4637
Verified this bug since this is added as a documentation to avoid using special characters.