Merge pull request #276 from truecharts/hotpatchfix
fix the second hotpatch
This commit is contained in:
commit
d170ad3dcf
@ -1,13 +1,14 @@
|
|||||||
diff --git plugins/kubernetes_linux/backup.py plugins/kubernetes_linux/backup.py
|
diff --git plugins/kubernetes_linux/backup.py plugins/kubernetes_linux/backup.py
|
||||||
index 365cd1718b4..1046a64c2a5 100644
|
index 365cd1718b4..1046a64c2a5 100644
|
||||||
|
index d8a48d45f89..365cd1718b4 100644
|
||||||
--- plugins/kubernetes_linux/backup.py
|
--- plugins/kubernetes_linux/backup.py
|
||||||
+++ plugins/kubernetes_linux/backup.py
|
+++ plugins/kubernetes_linux/backup.py
|
||||||
@@ -62,7 +62,7 @@ def backup_chart_releases(self, job, backup_name):
|
@@ -61,7 +61,8 @@ def backup_chart_releases(self, job, backup_name):
|
||||||
|
['metadata.namespace', '=', chart_release['namespace']]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
# 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']):
|
||||||
- for secret in sorted(secrets, key=lambda d: d['metadata']['name'] and d.get('data')):
|
+ # 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']):
|
+ 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:
|
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))
|
f.write(self.middleware.call_sync('k8s.secret.export_to_yaml_internal', secret))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user