Here #2582 it has been discussed to add a config for deleting secrets globally on operator level. This is very nice and helps greatly.
In my case I have a setup where my operator contains the config delete_annotation_name_key: delete-clustername and as a safety config enable_secrets_deletion: false which is needed if I want to clear a postgres cluster completely but still need the secrets. This works like a charm but I have temporary walg cluster clones which can be applied to get some backups. This temporary walg clones should still delete their secrets post deletion therefore a config is needed on cluster level.
I implemented the config enable_secrets_deletion_key in a similar way as delete_annotation_name_key works. This allows me to override the operator wide enable_secrets_deletion configuratin per postgresql cluster. If it is not set, the operator decides whether the secrets should be deleted, if it is set to true the secrets are deleted nevertheless and if it is set to false the secrets will not be deleted, allowing for a more fine granular configuration.
I have checked several possible scenarios with the following results:
Here #2582 it has been discussed to add a config for deleting secrets globally on operator level. This is very nice and helps greatly.
In my case I have a setup where my operator contains the config
delete_annotation_name_key: delete-clustername
and as a safety configenable_secrets_deletion: false
which is needed if I want to clear a postgres cluster completely but still need the secrets. This works like a charm but I have temporary walg cluster clones which can be applied to get some backups. This temporary walg clones should still delete their secrets post deletion therefore a config is needed on cluster level. I implemented the configenable_secrets_deletion_key
in a similar way asdelete_annotation_name_key
works. This allows me to override the operator wideenable_secrets_deletion
configuratin per postgresql cluster. If it is not set, the operator decides whether the secrets should be deleted, if it is set totrue
the secrets are deleted nevertheless and if it is set tofalse
the secrets will not be deleted, allowing for a more fine granular configuration.enable_secrets_deletion
delete_annotation_name_key
delete-clustername
enable-secrets-deletion
@dmotte can you review this please?