ipolyzos commented on pull request #1466:
URL: https://github.com/apache/camel-k/pull/1466#issuecomment-634911258


   The _**"--all"**_ flag to added to uninstall command.
   
   Please see below for the test scenario to verify behaviour:
   ```
   $ kamel install 
   Camel K installed in namespace default 
   $ kubectl get 
all,pvc,configmap,rolebindings,clusterrolebindings,secrets,sa,roles,clusterroles,crd
 -l 'app=camel-k'
   NAME                                   READY   STATUS              RESTARTS  
 AGE
   pod/camel-k-operator-89fb65586-rvdvd   0/1     ContainerCreating   0         
 2s
   
   NAME                               READY   UP-TO-DATE   AVAILABLE   AGE
   deployment.apps/camel-k-operator   0/1     1            0           2s
   
   NAME                                         DESIRED   CURRENT   READY   AGE
   replicaset.apps/camel-k-operator-89fb65586   1         1         0       2s
   
   NAME                                                                     
ROLE                                    AGE
   rolebinding.rbac.authorization.k8s.io/camel-k-operator                   
Role/camel-k-operator                   2s
   rolebinding.rbac.authorization.k8s.io/camel-k-operator-events            
Role/camel-k-operator-events            2s
   rolebinding.rbac.authorization.k8s.io/camel-k-operator-servicemonitors   
Role/camel-k-operator-servicemonitors   2s
   
   NAME                              SECRETS   AGE
   serviceaccount/camel-k-operator   1         2s
   
   NAME                                                              CREATED AT
   role.rbac.authorization.k8s.io/camel-k-operator                   
2020-05-27T19:50:43Z
   role.rbac.authorization.k8s.io/camel-k-operator-events            
2020-05-27T19:50:43Z
   role.rbac.authorization.k8s.io/camel-k-operator-servicemonitors   
2020-05-27T19:50:43Z
   
   NAME                                                 CREATED AT
   clusterrole.rbac.authorization.k8s.io/camel-k:edit   2020-05-27T19:50:43Z
   
   NAME                                                                         
         CREATED AT
   customresourcedefinition.apiextensions.k8s.io/builds.camel.apache.org        
         2020-05-27T19:50:43Z
   customresourcedefinition.apiextensions.k8s.io/camelcatalogs.camel.apache.org 
         2020-05-27T19:50:43Z
   
customresourcedefinition.apiextensions.k8s.io/integrationkits.camel.apache.org  
      2020-05-27T19:50:43Z
   
customresourcedefinition.apiextensions.k8s.io/integrationplatforms.camel.apache.org
   2020-05-27T19:50:43Z
   customresourcedefinition.apiextensions.k8s.io/integrations.camel.apache.org  
         2020-05-27T19:50:43Z
   $ kamel uninstall --all
   Camel K Integration Platform removed from namespace default
   Camel K Config Maps removed from namespace default
   Camel K Operator removed from namespace default
   Camel K Role Bindings removed from namespace default
   Camel K Roles removed from namespace default
   Camel K Service Accounts removed from namespace default
   Camel K Custom Resource Definitions removed from cluster
   Camel K Cluster Roles removed from cluster
   $ kubectl get 
all,pvc,configmap,rolebindings,clusterrolebindings,secrets,sa,roles,clusterroles,crd
 -l 'app=camel-k'                                                               
                
   No resources found in default namespace.
   $ kamel install 
   Camel K installed in namespace default 
   $ kamel uninstall                                                            
    git:(kamel-uninstall-remove-crd-clusterrole↑1|✚2 
   Camel K Integration Platform removed from namespace default
   Camel K Config Maps removed from namespace default
   Camel K Operator removed from namespace default
   Camel K Role Bindings removed from namespace default
   Camel K Roles removed from namespace default
   Camel K Service Accounts removed from namespace default
   $ kubectl get 
all,pvc,configmap,rolebindings,clusterrolebindings,secrets,sa,roles,clusterroles,crd
 -l 'app=camel-k'                                                               
                
   NAME                                   READY   STATUS        RESTARTS   AGE
   pod/camel-k-operator-89fb65586-zpv8z   0/1     Terminating   0          10s
   
   NAME                                                 CREATED AT
   clusterrole.rbac.authorization.k8s.io/camel-k:edit   2020-05-27T19:59:49Z
   
   NAME                                                                         
         CREATED AT
   customresourcedefinition.apiextensions.k8s.io/builds.camel.apache.org        
         2020-05-27T19:59:48Z
   customresourcedefinition.apiextensions.k8s.io/camelcatalogs.camel.apache.org 
         2020-05-27T19:59:48Z
   
customresourcedefinition.apiextensions.k8s.io/integrationkits.camel.apache.org  
      2020-05-27T19:59:48Z
   
customresourcedefinition.apiextensions.k8s.io/integrationplatforms.camel.apache.org
   2020-05-27T19:59:48Z
   customresourcedefinition.apiextensions.k8s.io/integrations.camel.apache.org  
         2020-05-27T19:59:48Z
   
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to