Removed all occurrences of removed KuryrNet CRD.

CRD KuryrNet was already replaced by KuryrNetwork, although there are
some spots, where it is mentioned - mostly docs and log messages. In
this commit we get rid of it once and for all.

Change-Id: I20345a1f4d4288534d620f0bd2196fc77ee795e9
This commit is contained in:
Roman Dobosz 2022-06-01 13:10:48 +02:00
parent f63cea5470
commit 846f158724
11 changed files with 12 additions and 15 deletions

View File

@ -414,7 +414,6 @@ rules:
- openstack.org
verbs: ["*"]
resources:
- kuryrnets
- kuryrnetworks
- kuryrnetpolicies
- kuryrnetworkpolicies

View File

@ -92,7 +92,6 @@ Edit ``kuryr.conf``:
- openstack.org
verbs: ["*"]
resources:
- kuryrnets
- kuryrnetworks
- kuryrnetpolicies
- kuryrnetworkpolicies

View File

@ -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'

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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,

View File

@ -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)

View File

@ -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(

View File

@ -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

View File

@ -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',