Bug 1378243 - clusterresourcequota should not block emails in client-side validation
Summary: clusterresourcequota should not block emails in client-side validation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-21 21:57 UTC by Fabiano Franz
Modified: 2017-09-08 09:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-09 21:53:08 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Fabiano Franz 2016-09-21 21:57:35 UTC
Description of problem:

oc create clusterresourcequota 
does not accept email address as a valid regex pattern.

error: couldn't parse the selector string "openshift.io/requester=test+user": unable to parse requirement: invalid label value: "test+user": must match the regex (([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])? (e.g. 'MyValue' or 'my_value' or '12345')

Comment 1 Fabiano Franz 2016-09-21 21:58:01 UTC
Fixed in https://github.com/openshift/origin/pull/10912

Comment 2 Xingxing Xia 2016-09-22 08:21:18 UTC
Yeah, the bug is indeed an issue because `oc annotate` with email can succeed:
$ oc annotate namespace xxia-proj --config ./admin.kubeconfig openshift.io/requester=deads
namespace "xxia-proj" annotated

Verified this bug with:
oc v1.4.0-alpha.0+6e155d0
kubernetes v1.4.0-beta.3+d19513f
features: Basic-Auth GSSAPI Kerberos SPNEGO

$ oc create clusterquota for-deads-email-by-annotation --config ./admin.kubeconfig --project-annotation-selector=openshift.io/requester=deads --hard=secrets=50
clusterresourcequota "for-deads-email-by-annotation" created

$ oc get clusterquota for-deads-email-by-annotation --config ./admin.kubeconfig -o yaml | grep openshift.io/requester
    openshift.io/requester: deads


Note You need to log in before you can comment on or make changes to this bug.