Bug 1454535
Summary: | modifying project name in template doesn't work | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Kenjiro Nakayama <knakayam> |
Component: | Master | Assignee: | Michal Fojtik <mfojtik> |
Status: | CLOSED ERRATA | QA Contact: | Wang Haoran <haowang> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.4.1 | CC: | aos-bugs, erich, geliu, jforrest, jokerman, mfojtik, mmccomas, pweil, wewang |
Target Milestone: | --- | ||
Target Release: | 3.7.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause: Creating project using project template does not use the substituted project name, but the namespace name.
Consequence: Not able to use parametrized name as a project name as the generated suffix or prefix might be dropped.
Fix: Use the substituted project name when creating the namespace.
Result:
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2017-11-28 21:55:46 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: | |
Embargoed: |
Description
Kenjiro Nakayama
2017-05-23 01:06:07 UTC
I think there are couple problems here: 1) Using the ${PROJECT_REQUESTING_USER} only for the project name won't work unless you do the same everywhere where ${PROJECT_NAME} parameter is used in the template (iow. RoleBindings, etc.) 2) https://github.com/openshift/origin/pull/14344 this has to be fixed 3) there is a bug in `new-project` that prevents the newly created project to be set. Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/96e068b56c1432cdcdf55895dcd22f37124df0eb Bug 1454535 - Use created project name over namespace name in project template Verified in OCP env: openshift v3.6.94 kubernetes v1.6.1+5115d708d7 etcd 3.1.0 Steps: 1. login OCP cluster, and working as system:admin user 2. #oadm create-bootstrap-project-template -o yaml > template.yaml 3. Edit template.yaml: replace ALL "name: ${PROJECT_NAME}" to "name: ${PROJECT_NAME}-lg", pay attention all items, but not project metadate name only. 4. modify master-config.yaml: projectRequestTemplate: "default/project-request" and restart master service 5. # oc new-project ccc --description=lala1 6. # oc get project NAME DISPLAY NAME STATUS ccc-lg Active verified in openshift v3.6.94 kubernetes v1.6.1+5115d708d7 etcd 3.1.0 oc v3.6.94 [root@dhcp-128-91 Downloads]# ./usr/share/atomic-openshift/linux/oc new-project wewang Now using project "wewang-wewang" on server "https://host-xxxx:8443". You can add applications to this project with the 'new-app' command. For example, try: oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git to build a new example application in Ruby. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2017:3188 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |