{"action":"closed","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/4625","labels_url":"https://api.github.com/repos/openshift/origin/issues/4625/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/4625/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/4625/events","html_url":"https://github.com/openshift/origin/issues/4625","id":105964485,"number":4625,"title":"oc new-app croaks when using sti-builder which exposes ports","user":{"login":"rhuss","id":99080,"avatar_url":"https://avatars.githubusercontent.com/u/99080?v=3","gravatar_id":"","url":"https://api.github.com/users/rhuss","html_url":"https://github.com/rhuss","followers_url":"https://api.github.com/users/rhuss/followers","following_url":"https://api.github.com/users/rhuss/following{/other_user}","gists_url":"https://api.github.com/users/rhuss/gists{/gist_id}","starred_url":"https://api.github.com/users/rhuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhuss/subscriptions","organizations_url":"https://api.github.com/users/rhuss/orgs","repos_url":"https://api.github.com/users/rhuss/repos","events_url":"https://api.github.com/users/rhuss/events{/privacy}","received_events_url":"https://api.github.com/users/rhuss/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-11T08:19:13Z","updated_at":"2015-09-11T12:37:38Z","closed_at":"2015-09-11T12:37:37Z","body":"Using this [java-sti builder image](https://github.com/fabric8io/base-images/tree/master/sti/images/centos7) which exposes [two ports](https://github.com/fabric8io/base-images/blob/master/sti/images/centos7/Dockerfile#L38) for the metric agent running ([jolokia](http://www.jolokia.org) and Prometheus' [jmx_exporter](https://github.com/prometheus/jmx_exporter)),  using \r\n\r\n```\r\noc new-app  \\\r\n    -e OUTPUT_DIR=quickstarts/java/simple-fatjar/target \\\r\n    -e MAVEN_MODULE=io.fabric8.jube.images.fabric8:quickstart-java-simple-fatjar \\\r\n    --loglevel=5 \\ \r\n    --strategy=source fabric8/sti-java-centos7:1.0.1~https://github.com/fabric8io/quickstarts.git\r\n```\r\n\r\nfails with \r\n\r\n```\r\nI0911 10:01:57.501049   18298 imagelookup.go:289] checking ImageStream fabric8/sti-java-centos7 with ref \"1.0.1\"\r\nI0911 10:01:57.519160   18298 templatelookup.go:35] checking template default/fabric8/sti-java-centos7:1.0.1\r\nI0911 10:01:57.521067   18298 templatelookup.go:35] checking template openshift/fabric8/sti-java-centos7:1.0.1\r\nI0911 10:01:57.523101   18298 componentref.go:260] Errors occurred during resolution: []error{errors.aggregate{(*errors.errorString)(0x20bb97160)}}\r\nI0911 10:01:57.523598   18298 imagelookup.go:48] checking local Docker daemon for \"fabric8/sti-java-centos7:1.0.1\"\r\nI0911 10:01:57.807677   18298 imagelookup.go:260] partial match on \"fabric8/sti-java-centos7:1.0.0\" with 0.250000\r\nI0911 10:01:57.814187   18298 newapp.go:600] Code https://github.com/fabric8io/quickstarts.git\r\nI0911 10:01:57.814203   18298 newapp.go:601] Components fabric8/sti-java-centos7:1.0.1\r\nI0911 10:01:57.814210   18298 newapp.go:394] found group: app.ComponentReferences{(*app.ComponentInput)(0x20bdb9f80)}\r\nI0911 10:01:57.814224   18298 newapp.go:402] will use \"fabric8/sti-java-centos7:1.0.1\" as the base image for a source build of \"https://github.com/fabric8io/quickstarts.git\"\r\nimagestreams/sti-java-centos7\r\nimagestreams/quickstarts\r\nbuildconfigs/quickstarts\r\nError: DeploymentConfig \"quickstarts\" is invalid: [template.controllerTemplate.template.spec.containers[0].ports[0].name: \r\ninvalid value 'quickstarts-tcp-8778': must be an IANA_SVC_NAME (at most 15 characters, matching regex [a-z0-9]([a-z0-9-]*[a-z0-9])*, \r\nit must contain at least one letter [a-z], and hyphens cannot be adjacent to other hyphens): e.g. \"http\",\r\n template.controllerTemplate.template.spec.containers[0].ports[1].name:\r\ninvalid value 'quickstarts-tcp-9779': must be an IANA_SVC_NAME (at most 15 characters, matching regex [a-z0-9]([a-z0-9-]*[a-z0-9])*,\r\n it must contain at least one letter [a-z], and hyphens cannot be adjacent to other hyphens): e.g. \"http\"]\r\n```\r\n\r\nAs it seems, openshift creates an invalid port name automatically."}}