We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29ecf1a commit 738efd5Copy full SHA for 738efd5
src/kubernetes_utils.py
@@ -172,6 +172,13 @@ def sync_secret(
172
annotations = cs_metadata.get('annotations', None)
173
labels = cs_metadata.get('labels', None)
174
175
+ try:
176
+ v1.read_namespace(name=namespace)
177
+ except exceptions.ApiException as e:
178
+ logger.debug(f'Namespace {namespace} not found while syncing secret {sec_name}. Never mind on this rare situation it will be handled in other place.')
179
+ if e.status == 404:
180
+ return
181
+
182
if 'data' not in body:
183
raise kopf.TemporaryError('Property data is missing.')
184
0 commit comments