diff options
author | Jordan Liggitt <jliggitt@redhat.com> | 2017-04-27 23:28:55 -0400 |
---|---|---|
committer | Jordan Liggitt <jliggitt@redhat.com> | 2017-04-27 23:28:55 -0400 |
commit | a6d22d9c713c770588421b795b4ce8e90d430eda (patch) | |
tree | 62734e8427c2954a724f1a8d977b71437a6215f5 | |
parent | 58b1799986e7a41cc4e987dabcefa816a286b203 (diff) | |
download | openshift-a6d22d9c713c770588421b795b4ce8e90d430eda.tar.gz openshift-a6d22d9c713c770588421b795b4ce8e90d430eda.tar.bz2 openshift-a6d22d9c713c770588421b795b4ce8e90d430eda.tar.xz openshift-a6d22d9c713c770588421b795b4ce8e90d430eda.zip |
Reserve kubernetes and 'kubernetes-' prefixed namespaces
-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 bc5245216..0b9e734af 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 |