diff options
author | OpenShift Bot <eparis+openshiftbot@redhat.com> | 2017-05-12 17:42:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-12 17:42:38 -0500 |
commit | 56cc912451a9da3cb603db85edb01fb2d8d92ac8 (patch) | |
tree | c00760963ca87cf44dd1eaa71affa18db2d1c76b /roles/lib_openshift | |
parent | ad18b8ee7a2468413c70cc4f263c6a147acb5fef (diff) | |
parent | a6d22d9c713c770588421b795b4ce8e90d430eda (diff) | |
download | openshift-56cc912451a9da3cb603db85edb01fb2d8d92ac8.tar.gz openshift-56cc912451a9da3cb603db85edb01fb2d8d92ac8.tar.bz2 openshift-56cc912451a9da3cb603db85edb01fb2d8d92ac8.tar.xz openshift-56cc912451a9da3cb603db85edb01fb2d8d92ac8.zip |
Merge pull request #4030 from liggitt/reserved-namespaces
Merged by openshift-bot
Diffstat (limited to 'roles/lib_openshift')
-rw-r--r-- | roles/lib_openshift/library/oc_objectvalidator.py | 2 | ||||
-rw-r--r-- | roles/lib_openshift/src/class/oc_objectvalidator.py | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/roles/lib_openshift/library/oc_objectvalidator.py b/roles/lib_openshift/library/oc_objectvalidator.py index d9ce5679b..72add01f4 100644 --- a/roles/lib_openshift/library/oc_objectvalidator.py +++ b/roles/lib_openshift/library/oc_objectvalidator.py @@ -1398,8 +1398,10 @@ class OCObjectValidator(OpenShiftCLI): # check if it uses a reserved name name = namespace['metadata']['name'] if not any((name == 'kube', + name == 'kubernetes', name == 'openshift', name.startswith('kube-'), + name.startswith('kubernetes-'), name.startswith('openshift-'),)): return False diff --git a/roles/lib_openshift/src/class/oc_objectvalidator.py b/roles/lib_openshift/src/class/oc_objectvalidator.py index 43f6cac67..c9fd3b532 100644 --- a/roles/lib_openshift/src/class/oc_objectvalidator.py +++ b/roles/lib_openshift/src/class/oc_objectvalidator.py @@ -35,8 +35,10 @@ class OCObjectValidator(OpenShiftCLI): # check if it uses a reserved name name = namespace['metadata']['name'] if not any((name == 'kube', + name == 'kubernetes', name == 'openshift', name.startswith('kube-'), + name.startswith('kubernetes-'), name.startswith('openshift-'),)): return False |