scale-catalog/patches/backups.patch
heavybullets8 0d76ba4901 try this
2022-12-26 14:45:05 -07:00

11 lines
814 B
Diff

--- /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))