This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e451fe  Fix namespace delete command in cleanup-helm-release.sh 
script (#5)
3e451fe is described below

commit 3e451fecb34b3a72b51c72a1c59cbeaf44e9b179
Author: Oscar Espitia <nickel...@users.noreply.github.com>
AuthorDate: Mon Apr 27 03:11:45 2020 -0400

    Fix namespace delete command in cleanup-helm-release.sh script (#5)
    
    ### Motivation
    
    While making use of the scripts provided in this repo to prepare helm 
releases, I noticed that providing the ```-d``` flag (delete namespace) for the 
```./scripts/pulsar/cleanup_helm_release.sh``` would always fail claiming that 
the **namespace already exists**. Upon closer examination, I noticed that the 
kubectl command to delete the provided namespace is actually attempting to 
create it instead.
    
    ### Modifications
    
    I've gone ahead and made the corresponding modification on the script to 
delete the namespace (went from ```kubectl create namespace ${namespace}``` to 
```kubectl delete namespace ${namespace}```).
    
    ### Verifying this change
    
    I'm not sure what possible verifications I can provide for this PR. Please 
advise.
---
 scripts/pulsar/cleanup_helm_release.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pulsar/cleanup_helm_release.sh 
b/scripts/pulsar/cleanup_helm_release.sh
index 73c0e01..10468a2 100755
--- a/scripts/pulsar/cleanup_helm_release.sh
+++ b/scripts/pulsar/cleanup_helm_release.sh
@@ -73,7 +73,7 @@ release=${release:-pulsar-dev}
 
 function delete_namespace() {
     if [[ "${delete_namespace}" == "true" ]]; then
-        kubectl create namespace ${namespace}
+        kubectl delete namespace ${namespace}
     fi
 }
 

Reply via email to