diff --git a/devstack/lib/kuryr_kubernetes b/devstack/lib/kuryr_kubernetes index 276823d0b..1ae8000d1 100644 --- a/devstack/lib/kuryr_kubernetes +++ b/devstack/lib/kuryr_kubernetes @@ -414,7 +414,6 @@ rules: - openstack.org verbs: ["*"] resources: - - kuryrnets - kuryrnetworks - kuryrnetpolicies - kuryrnetworkpolicies diff --git a/doc/source/installation/manual.rst b/doc/source/installation/manual.rst index 7c7b00450..f6760371c 100644 --- a/doc/source/installation/manual.rst +++ b/doc/source/installation/manual.rst @@ -92,7 +92,6 @@ Edit ``kuryr.conf``: - openstack.org verbs: ["*"] resources: - - kuryrnets - kuryrnetworks - kuryrnetpolicies - kuryrnetworkpolicies diff --git a/kuryr_kubernetes/constants.py b/kuryr_kubernetes/constants.py index 1792f2874..9ec38fbf4 100644 --- a/kuryr_kubernetes/constants.py +++ b/kuryr_kubernetes/constants.py @@ -37,7 +37,6 @@ K8S_OBJ_POD = 'Pod' K8S_OBJ_SERVICE = 'Service' K8S_OBJ_ENDPOINTS = 'Endpoints' K8S_OBJ_POLICY = 'NetworkPolicy' -K8S_OBJ_KURYRNET = 'KuryrNet' K8S_OBJ_KURYRNETWORK = 'KuryrNetwork' K8S_OBJ_KURYRNETPOLICY = 'KuryrNetPolicy' K8S_OBJ_KURYRNETWORKPOLICY = 'KuryrNetworkPolicy' diff --git a/kuryr_kubernetes/controller/handlers/kuryrnetwork.py b/kuryr_kubernetes/controller/handlers/kuryrnetwork.py index 40900282c..cbcc6c421 100644 --- a/kuryr_kubernetes/controller/handlers/kuryrnetwork.py +++ b/kuryr_kubernetes/controller/handlers/kuryrnetwork.py @@ -179,12 +179,12 @@ class KuryrNetworkHandler(k8s_base.ResourceEventHandler): services = driver_utils.get_services() self._update_services(services, crd_selectors, project_id) - LOG.debug('Removing finalizer for KuryrNet CRD %s', kuryrnet_crd) + LOG.debug('Removing finalizer for KuryrNetwork CRD %s', kuryrnet_crd) try: self.k8s.remove_finalizer(kuryrnet_crd, constants.KURYRNETWORK_FINALIZER) except k_exc.K8sClientException: - LOG.exception('Error removing kuryrnetwork CRD finalizer for %s', + LOG.exception('Error removing KuryrNetwork CRD finalizer for %s', kuryrnet_crd) raise diff --git a/kuryr_kubernetes/controller/handlers/kuryrnetwork_population.py b/kuryr_kubernetes/controller/handlers/kuryrnetwork_population.py index 09a9c9cd2..248452b55 100644 --- a/kuryr_kubernetes/controller/handlers/kuryrnetwork_population.py +++ b/kuryr_kubernetes/controller/handlers/kuryrnetwork_population.py @@ -93,5 +93,5 @@ class KuryrNetworkPopulationHandler(k8s_base.ResourceEventHandler): kubernetes.patch_crd('status', utils.get_res_link(kns_crd), {'populated': populated}) except exceptions.K8sClientException: - LOG.exception('Error updating kuryrnet CRD %s', crd_name) + LOG.exception('Error updating KuryrNetwork CRD %s', crd_name) raise diff --git a/kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py b/kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py index 72c1a1259..ce7ae274d 100644 --- a/kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py +++ b/kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py @@ -54,7 +54,7 @@ class KuryrNetworkPolicyHandler(k8s_base.ResourceEventHandler): def _patch_kuryrnetworkpolicy_crd(self, knp, field, data, action='replace'): name = knp['metadata']['name'] - LOG.debug('Patching KuryrNet CRD %s', name) + LOG.debug('Patching KuryrNetwork CRD %s', name) try: status = self.k8s.patch_crd(field, utils.get_res_link(knp), data, action=action) diff --git a/kuryr_kubernetes/controller/handlers/lbaas.py b/kuryr_kubernetes/controller/handlers/lbaas.py index ce379873c..2ed94d69a 100644 --- a/kuryr_kubernetes/controller/handlers/lbaas.py +++ b/kuryr_kubernetes/controller/handlers/lbaas.py @@ -210,7 +210,8 @@ class ServiceHandler(k8s_base.ResourceEventHandler): except k_exc.K8sConflict: raise k_exc.ResourceNotReady(svc_name) except k_exc.K8sClientException as e: - LOG.exception('Error updating kuryrnet CRD %s', loadbalancer_crd) + LOG.exception('Error updating KuryrNetwork CRD %s', + loadbalancer_crd) self.k8s.add_event( service, 'UpdateKLBFailed', 'Error when updating KuryrLoadBalancer object: %s' % e, diff --git a/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork.py b/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork.py index 4e848987c..7208173a4 100644 --- a/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork.py +++ b/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork.py @@ -52,8 +52,8 @@ class TestKuryrNetworkHandler(test_base.TestCase): self._handler = mock.MagicMock( spec=kuryrnetwork.KuryrNetworkHandler) self._handler._drv_project = mock.Mock(spec=drivers.PodProjectDriver) - # NOTE(ltomasbo): The KuryrNet handler is associated to the usage of - # namespace subnet driver, + # NOTE(ltomasbo): The KuryrNetwork handler is associated to the usage + # of namespace subnet driver, self._handler._drv_subnets = mock.Mock( spec=subnet_drv.NamespacePodSubnetDriver) self._handler._drv_sg = mock.Mock(spec=drivers.PodSecurityGroupsDriver) diff --git a/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork_population.py b/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork_population.py index 641b71f0a..84492c0be 100644 --- a/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork_population.py +++ b/kuryr_kubernetes/tests/unit/controller/handlers/test_kuryrnetwork_population.py @@ -47,8 +47,8 @@ class TestKuryrNetworkPopulationHandler(test_base.TestCase): self._handler = mock.MagicMock( spec=kuryrnetwork_population.KuryrNetworkPopulationHandler) - # NOTE(ltomasbo): The KuryrNet handler is associated to the usage of - # namespace subnet driver, + # NOTE(ltomasbo): The KuryrNetwork handler is associated to the usage + # of namespace subnet driver, self._handler._drv_subnets = mock.Mock( spec=subnet_drv.NamespacePodSubnetDriver) self._handler._drv_vif_pool = mock.MagicMock( diff --git a/kuryr_kubernetes/tests/unit/controller/handlers/test_namespace.py b/kuryr_kubernetes/tests/unit/controller/handlers/test_namespace.py index aba3e77a9..c06b3fdfb 100644 --- a/kuryr_kubernetes/tests/unit/controller/handlers/test_namespace.py +++ b/kuryr_kubernetes/tests/unit/controller/handlers/test_namespace.py @@ -55,7 +55,7 @@ class TestNamespaceHandler(test_base.TestCase): def _get_crd(self): crd = { - 'kind': 'KuryrNet', + 'kind': 'KuryrNetwork', 'metadata': { 'name': self._namespace_name, 'namespace': self._namespace_name, @@ -96,7 +96,7 @@ class TestNamespaceHandler(test_base.TestCase): self._update_labels.assert_called_once_with(net_crd, {}) self._add_kuryrnetwork_crd.assert_not_called() - def test_on_present_add_kuryrnet_crd_exception(self): + def test_on_present_add_kuryrnetwork_crd_exception(self): self._get_kns_crd.return_value = None self._add_kuryrnetwork_crd.side_effect = k_exc.K8sClientException self._handle_namespace.return_value = True diff --git a/kuryr_kubernetes/utils.py b/kuryr_kubernetes/utils.py index 45b22ef56..2d8993798 100644 --- a/kuryr_kubernetes/utils.py +++ b/kuryr_kubernetes/utils.py @@ -85,7 +85,6 @@ cache.configure_cache_region(CONF, nodes_cache_region) RESOURCE_MAP = {'Endpoints': 'endpoints', 'KuryrLoadBalancer': 'kuryrloadbalancers', - 'KuryrNet': 'kuryrnets', 'KuryrNetPolicy': 'kuryrnetpolicies', 'KuryrNetwork': 'kuryrnetworks', 'KuryrNetworkPolicy': 'kuryrnetworkpolicies',