Browse Source

Adapt selfLink calculation for KuryrNetworkPolicy CRD objects.

Implements: blueprint selflink
Change-Id: I1fcd15c17d387fea207f8eedabfff684d3be512b
changes/40/768340/8
Roman Dobosz 6 months ago
parent
commit
96f46f5618
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      kuryr_kubernetes/controller/drivers/utils.py
  2. +1
    -1
      kuryr_kubernetes/controller/handlers/kuryrnetworkpolicy.py

+ 1
- 1
kuryr_kubernetes/controller/drivers/utils.py View File

@ -248,7 +248,7 @@ def patch_kuryrnetworkpolicy_crd(crd, i_rules, e_rules):
'egressSgRules': e_rules,
}
kubernetes.patch_crd('spec', crd['metadata']['selfLink'], spec)
kubernetes.patch_crd('spec', utils.get_res_link(crd), spec)
except k_exc.K8sResourceNotFound:
LOG.debug('KuryrNetworkPolicy CRD not found %s', crd_name)
except k_exc.K8sClientException:


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

@ -84,7 +84,7 @@ class KuryrNetworkPolicyHandler(k8s_base.ResourceEventHandler):
name = knp['metadata']['name']
LOG.debug('Patching KuryrNet CRD %s', name)
try:
status = self.k8s.patch_crd(field, knp['metadata']['selfLink'],
status = self.k8s.patch_crd(field, utils.get_res_link(knp),
data, action=action)
except exceptions.K8sResourceNotFound:
LOG.debug('KuryrNetworkPolicy CRD not found %s', name)


Loading…
Cancel
Save