Browse Source

Reserve kubernetes and 'kubernetes-' prefixed namespaces

Jordan Liggitt 8 years ago
parent
commit
a6d22d9c71

+ 2 - 0
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
 

+ 2 - 0
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