Skip to content

can create a project/namespace with a hyphen but builds blow up on the hyphen #933

@thoraxe

Description

@thoraxe

Given the following project:

{
  "kind": "Project",
  "apiVersion": "v1beta1",
  "metadata": {
    "name": "sinatra-project",
    "labels": {
      "name": "sinatra-project"
    },
    "annotations": {
      "description": "This is a simple project to demonstrate Ruby+STI on OpenShift v3"
    }
  },    
  "displayName": "Hello Sinatra",
}

When you try to do a build related to this project, the build fails with the following error:

[root@ose3-master simple-openshift-sinatra-sti]# osc --namespace=sinatra-project build-logs a1aa7e35-ad82-11e4-8f5f-525400b33d1d
2015-02-05T22:04:10.285998866Z Cloning into '/tmp/sti974342869/upload/src'...
2015-02-05T22:04:11.829370924Z Already on 'master'
2015-02-05T22:04:36.850229019Z I0205 17:04:36.814960       1 build.go:160] Successfully built 172.30.17.158:5001/sinatra-project/simple-openshift-sinatra-sti
2015-02-05T22:04:39.862687558Z 2015/02/05 17:04:39 Build error: API error (500): Invalid namespace name (sinatra-project), only [a-z0-9_] are allowed, size between 4 and 30

I am using the app here:
https://github.com/thoraxe/simple-openshift-sinatra-sti

And using openshift ex generate inside its folder after removing the Dockerfile. In other words:

rm -f Dockerfile
openshift ex generate | osc apply --namespace=sinatra-test -f -

I don't understand how the namespace can be invalid if you can not only create it but assign stuff to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions