Skip to content

Commit

Permalink
add annotation and labels during restore
Browse files Browse the repository at this point in the history
  • Loading branch information
balajisa09 committed Feb 13, 2024
1 parent 7447340 commit cca2086
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions restore/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ def restore_tls_secrets():
if(namespace not in exclude_namespaces):
# Create a V1Secret object from the dictionary
secret = k8s_client.V1Secret(
metadata=k8s_client.V1ObjectMeta(name=secret_dict['metadata']['name'],
namespace=secret_dict['metadata']['namespace'],
labels={"createdBy": "tls-restore"}),
metadata=k8s_client.V1ObjectMeta(
name=secret_dict['metadata']['name'],
namespace=secret_dict['metadata']['namespace'],
annotations=secret_dict['metadata']['annotations'],
labels=secret_dict['metadata']['labels']
),
data=secret_dict.get('data', {}),
type=secret_dict.get('type', None)
)
Expand Down

0 comments on commit cca2086

Please sign in to comment.