miracle2k/k8s-snapshots

KeyError: 'selfLink'

Closed this issue · 0 comments

k8s-snapshots crashes with this error on my DigitalOcean 1.21 cluster:

[asyncio] message=Exception in callback StreamReader._ensure_running.<locals>.cb() at /usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/asyncutils.py:116
handle: <Handle StreamReader._ensure_running.) at /usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/asyncutils.py:116> severity=ERROR
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/events.py", line 145, in _run
    self._callback(*self._args)
  File "/usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/asyncutils.py", line 122, in cb
    raise task.exception()
  File "/usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/asyncutils.py", line 107, in _iterate_task
    async for item in self.iterable:
  File "/usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/core.py", line 456, in get_rules
    async for rules in rules_from_kubernetes(ctx):
  File "/usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/core.py", line 380, in rules_from_kubernetes
    rule = await rule_from_persistent_volume(ctx, resource)
  File "/usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/core.py", line 242, in rule_from_persistent_volume
    return await rule_from_pv(ctx, volume, deltas, source=volume)
  File "/usr/local/lib/python3.6/site-packages/k8s_snapshots-0.0.0-py3.6.egg/k8s_snapshots/rule.py", line 179, in rule_from_pv
    source=volume.obj['metadata']['selfLink'],
KeyError: 'selfLink'

It looks like selfLink was deprecated and removed: kubernetes/enhancements#1164