---
# System prepended metadata

title: Test cases for delete strategy
tags: [kapp]

---

# Test cases for delete strategy 

###### tags: `kapp`

|  | Test cases for recorded apps | Operation | Namespace  Name  Kind  Age  Op  Op st.  Wait to  Rs  Ri | operation | Namespace  Name   Kind   Age  Op  Op st.  Wait to  Rs  Ri | operation | Namespace   Name      Kind        Age   Op       Op st.   Wait to   Rs   Ri  |
|-|-|-|-|-|-|-|-|
| 1 | app with resource default namespace  and no delete startegy | create | (cluster)  default  Namespace  31d  update  -  reconcile  ok  - | delete | (cluster)  default  Namespace  31d  deleteorphan  delete ok  - | create | (cluster)  default  Namespace  31d  update\-       reconcile ok  -  |
|  |  |  |  |  |  | create with different app name |   |
| 2 | app with resource  default namespace and plain delete startegy | create | (cluster)  default  Namespace  31d  update\-       reconcile ok  - | delete | (cluster)  default  Namespace  31d  deleteorphan  delete ok  - | create | (cluster)  default  Namespace  31d  update\-       reconcile ok  -  |
| 3 | app with resource  default namespace and orphan delete startegy | create | (cluster)  default  Namespace  31d  update\-       reconcile ok  - | delete | (cluster)  default  Namespace  31d  deleteorphan  delete ok  - | create | (cluster)  default  Namespace  31d  update\-       reconcile ok  -  |
| 4 | more than  one app with common resource  "default namespace" | create | kapp: Error: Ownership errors: | delete | NA | create | NA  |
| 5 | app with resource  non default namespace and no delete startegy | create | (cluster)  simple  Namespace  -    create  \-       reconcile  -   - | delete | (cluster)  simple  Namespace  1m   delete\-       delete ok  - | create | (cluster)  simple  Namespace  -    create  \-       reconcile  -   -  |
| 6 | app with resource  non default namespace and plain delete startegy | create | (cluster)  simple  Namespace  -    create  \-       reconcile  -   - | delete | (cluster)  simple  Namespace  30s  delete\-       delete ok  - | create | (cluster)  simple  Namespace  -    create  \-       reconcile  -   -  |
|  |  |  |  |  |  | create with different app name | (cluster)  simple  Namespace  -    create  \-       reconcile  -   -   |
| 7 | app with resource  non default namespace and orphan delete startegy | create | (cluster)  simple  Namespace  -    create  \-       reconcile  -   - | delete | (cluster)  simple  Namespace  19s  deleteorphan  delete ok  - | create | (cluster)  simple  Namespace  45s  update\-       reconcile ok  -   |
|  |  |  |  |  |  | create with different app name | (cluster)  simple  Namespace  28s  update\-       reconcile ok  -  |
| 8 | more than  one app with common resource  "non default namespace" | create | kapp: Error: Ownership errors | delete | NA | create | NA  |
| 9 | app with multiple resource(default ns, configmap) with no delete strategy | create | (cluster)  default     Namespace  32d  update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | (cluster)  default     Namespace  32d  deleteorphan  delete ok  -  default  simple-cm  ConfigMap  5m  delete  -  delete  ok  - | create | (cluster)  default    Namespace  32d  update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  -  |
| 10 | app with multiple resource(default ns, cm) with plain delete  strategy | create | (cluster)  default    Namespace  32d  update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | (cluster)  default    Namespace  32d  deleteorphan  delete ok  -  default  simple-cm  ConfigMap  32s  delete  -  delete  ok  - | create | (cluster)  default    Namespace  32d  update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  -  |
|   |  |  |  |  |  | create with different app name | (cluster)  default    Namespace  32d  update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  -  |
| 11 | app with multiple resource(default ns, cm) with orphan delete  strategy | create | (cluster)  default    Namespace  32d  update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | (cluster)  default    Namespace  32d  deleteorphan  delete ok  -  default  simple-cm  ConfigMap  35s  delete  orphan  delete  ok  - | create | (cluster)  default    Namespace  32d  update\-       reconcile ok  -  default  simple-cm  ConfigMap  1m  update  -  reconcile  ok  -  |
|  |  |  |  |  |  | create with different app name | (cluster)  default  Namespace  32d  update  -  reconcile  ok  -  default  simple-cm  ConfigMap  1m  update  -  reconcile  ok  -  |
| 12 | app with multiple resource(non default ns, cm) with no delete strategy | create | (cluster)  simple     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | (cluster)  simple     Namespace  28s  delete\-       delete ok  -  default  simple-cm  ConfigMap  28s  delete  -  delete  ok  - | create | (cluster)  simple     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  -  |
| 13 | app with multiple resource(non default ns, cm) with plain delete strategy | create | (cluster)  simple     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | (cluster)  simple     Namespace  39s  delete\-       delete ok  -  default  simple-cm  ConfigMap  39s  delete  -  delete  ok  -  | create | (cluster)  simple     Namespace  -    create  \-       reconcile  -   -    default  simple-cm  ConfigMap  -  create  -  reconcile  -  -  |
|  |  |  |  |  |  | create with different app name | (cluster)  simple     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  -   |
| 14 | app with multiple resource(non default ns, cm) with orphan delete strategy | create | (cluster)  orphan     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | (cluster)  orphan     Namespace  25s  deleteorphan  delete ok  -  default  simple-cm  ConfigMap  25s  delete  orphan  delete  ok  - | create | (cluster)  orphan     Namespace  1m   update\-       reconcile ok  -  default  simple-cm  ConfigMap  1m  update  -  reconcile  ok  -  |
|  |  |  |  |  |  | create with different app name | (cluster)  orphan     Namespace  2m   update\-       reconcile ok  -  default  simple-cm  ConfigMap  2m  update  -  reconcile  ok  -  |
|  |  |  |  |  |  |  |  |
|  |  |  |  |  |  |  |   |
|  | **Delete strategy for Labeled resources(user provided label)** |  | **Namespace  Name  Kind  Age  Op  Op st.  Wait to  Rs  Ri** | **OP** | **Namespace  Name  Kind  Age  Op  Op st.  Wait to  Rs  Ri** | **OP** | **Namespace  Name  Kind  Age  Op  Op st.  Wait to  Rs  Ri**  |
| 1 | app with resource (non default namespace , cm ) with  no/plain delete strategy | create | (cluster)  simple     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | (cluster)  simple     Namespace  11s  delete\-       delete ok  -  default  simple-cm  ConfigMap  11s  delete  -  delete  ok  - | create | (cluster)  simple     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  -  |
| 2 | app with resource (non default namespace, cm ) with orphan delete strategy | create | (cluster)  orphan     Namespace  -    create  \-       reconcile  -   -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete |   kapp: Error: Applying delete namespace/orphan (v1) cluster:    Patching resource namespace/orphan (v1) cluster:    API server says: the server rejected our request due to an error in our request (reason: Invalid) |  |   |
| 3 | app with resource ( default namespace , cm ) with  no/plain delete strategy | create | (cluster)  default    Namespace  5h   update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete | config map will get deleted but namspace will not, as it is a default namespace and we are orphaning inoperable resources. For labeled resources orphan delete will fail.    kapp: Error: Applying delete namespace/default (v1) cluster:    Patching resource namespace/default (v1) cluster:    API server says: the server rejected our request due to an error in our request (reason: Invalid) |  |   |
| 4 | app with resource (default namespace, cm ) with orphan delete strategy | create | (cluster)  default    Namespace  5h   update\-       reconcile ok  -  default  simple-cm  ConfigMap  -  create  -  reconcile  -  - | delete |   kapp: Error: Applying delete namespace/default (v1) cluster:    Patching resource namespace/default (v1) cluster:    API server says: the server rejected our request due to an error in our request (reason: Invalid) |  |   |