From 0065ad60d2c43338262f8a7173bca042c078a63c Mon Sep 17 00:00:00 2001 From: Kjeld Schouten-Lebbing Date: Mon, 26 Dec 2022 21:35:14 +0100 Subject: [PATCH] Create HP2.patch --- hotpatch/2212/HP2.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 hotpatch/2212/HP2.patch diff --git a/hotpatch/2212/HP2.patch b/hotpatch/2212/HP2.patch new file mode 100644 index 00000000..ccb75456 --- /dev/null +++ b/hotpatch/2212/HP2.patch @@ -0,0 +1,13 @@ +diff --git plugins/kubernetes_linux/backup.py plugins/kubernetes_linux/backup.py +index 365cd1718b4..1046a64c2a5 100644 +--- plugins/kubernetes_linux/backup.py ++++ plugins/kubernetes_linux/backup.py +@@ -62,7 +62,7 @@ def backup_chart_releases(self, job, backup_name): + ] + ) + # We ignore this keeping in line with helm behaviour where the secret malformed is ignored by helm +- for secret in sorted(secrets, key=lambda d: d['metadata']['name'] and d.get('data')): ++ 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)) +