Skip to content

Commit

Permalink
Fixed delete unseal secret (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuteng authored Oct 12, 2021
1 parent 1ef0bd6 commit efd2ea7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/sn-platform/templates/vault/vault-clear-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ spec:
command: ["sh", "-c"]
args:
- >
kubectl delete secret {{ template "pulsar.vault-secret-key-name" . }} --ignore-not-found=true -n {{ template "pulsar.namespace" . }} && kubectl delete secret {{ template "pulsar.console-secret-key-name" . }} --ignore-not-found=true -n {{ template "pulsar.namespace" . }} && kubectl delete secret {{ template "pulsar.vault-unseal-secret-key-name" . }} --ignore-not-found=true -n {{ template "pulsar.namespace" . }};
kubectl delete secret {{ template "pulsar.vault-secret-key-name" . }} --ignore-not-found=true -n {{ template "pulsar.namespace" . }} && kubectl delete secret {{ template "pulsar.console-secret-key-name" . }} --ignore-not-found=true -n {{ template "pulsar.namespace" . }};
until [ $? -eq 0 ]; do
echo "Clear vault resource not ready now, wait another 5s~";
sleep 5;
kubectl delete secret {{ template "pulsar.vault-secret-key-name" . }} -n {{ template "pulsar.namespace" . }} && kubectl delete secret {{ template "pulsar.console-secret-key-name" . }} -n {{ template "pulsar.namespace" . }};
kubectl delete secret {{ template "pulsar.vault-secret-key-name" . }} --ignore-not-found=true -n {{ template "pulsar.namespace" . }} && kubectl delete secret {{ template "pulsar.console-secret-key-name" . }} --ignore-not-found=true -n {{ template "pulsar.namespace" . }};
done;
echo "Clear vault resource is ready~";
env:
Expand Down

0 comments on commit efd2ea7

Please sign in to comment.