Browse Source

Adapt selfLink calculation for KuryrNet CRD objects.

Implements: blueprint selflink
Change-Id: Ibef7880af6850277ea6954c693f122c09b4e7815
changes/42/768342/8
Roman Dobosz 6 months ago
parent
commit
b38f0584a0
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      kuryr_kubernetes/controller/handlers/namespace.py
  2. +1
    -0
      kuryr_kubernetes/utils.py

+ 1
- 1
kuryr_kubernetes/controller/handlers/namespace.py View File

@ -67,7 +67,7 @@ class NamespaceHandler(k8s_base.ResourceEventHandler):
k8s.remove_annotations(ns['metadata']['selfLink'],
constants.K8S_ANNOTATION_NET_CRD)
try:
k8s.delete(net_crd['metadata']['selfLink'])
k8s.delete(utils.get_res_link(net_crd))
except exceptions.K8sResourceNotFound:
LOG.debug('Kuryrnet object already deleted: %s', net_crd)


+ 1
- 0
kuryr_kubernetes/utils.py View File

@ -75,6 +75,7 @@ cache.configure_cache_region(CONF, nodes_cache_region)
RESOURCE_MAP = {'Endpoints': 'endpoints',
'KuryrLoadBalancer': 'kuryrloadbalancers',
'KuryrNet': 'kuryrnets',
'KuryrNetPolicy': 'kuryrnetpolicies',
'KuryrNetwork': 'kuryrnetworks',
'KuryrNetworkPolicy': 'kuryrnetworkpolicies',


Loading…
Cancel
Save