scale-catalog/patches/backups.patch

11 lines
814 B
Diff
Raw Normal View History

2022-12-26 21:36:35 +00:00
--- /usr/lib/python3/dist-packages/middlewared/plugins/kubernetes_linux/backup.py 2022-12-13 05:32:23.000000000 -0700
+++ backups.patch 2022-12-26 14:14:25.075037767 -0700
@@ -61,7 +61,8 @@
['metadata.namespace', '=', chart_release['namespace']]
]
)
- for secret in sorted(secrets, key=lambda d: d['metadata']['name']):
+ # We ignore this keeping in line with helm behaviour where the secret malformed is ignored by helm
+ for secret in sorted(filter(lambda d: d.get('data'), secrets), key=lambda d: d['metadata']['name']):
with open(os.path.join(secrets_dir, secret['metadata']['name']), 'w') as f:
f.write(self.middleware.call_sync('k8s.secret.export_to_yaml_internal', secret))