Skip to content

Commit

Permalink
Update documentation around CRD removal (#3422)
Browse files Browse the repository at this point in the history
* Update documentation around CRD removal

* Update based on PR feedback
  • Loading branch information
theunrepentantgeek authored Oct 30, 2023
1 parent 7c05a20 commit f7e18f1
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions docs/hugo/content/guide/uninstalling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,36 @@ Before you uninstall Azure Service Operator, ensure that all of the resources ma
Use the [detach-on-delete reconcile-policy annotation]( {{< relref "annotations#serviceoperatorazurecomreconcile-policy" >}} )
if you want to delete an ASO resource from Kubernetes but retain it in Azure.

You can check if all ASO resources have been deleted by using: `kubectl api-resources -o name | grep azure.com | paste -sd "," - | xargs kubectl get -A`
You can check if all ASO resources have been deleted:

``` bash
kubectl api-resources -o name | grep azure.com | paste -sd "," - | xargs kubectl get -A
``````

## Uninstalling

We recommend that you uninstall ASO using the same mechanism you used to install it.

### Uninstalling with Helm

> **Warning**: This command will also remove installed ASO CRDs. As mentioned [above](#before-you-uninstall) it is strongly recommended that you
> ensure that there are no remaining ASO resources in the cluster before you run this command.
As mentioned [above](#before-you-uninstall) it is strongly recommended that you
ensure that there are no remaining ASO resources in the cluster before you run this command.

```bash
``` bash
helm --namespace azureserviceoperator-system delete asov2
kubectl delete namespace azureserviceoperator-system
```

Note that Helm does not remove CRDs, due to the potential for user data-loss. The [Helm documentation](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) reads:

> There is no support at this time for upgrading or deleting CRDs using Helm. This was an explicit decision after much community discussion due to the danger for unintentional data loss.

-- Retrieved on Monday, 16 October 2023

### Uninstalling with kubectl

> **Warning**: This command will also remove installed ASO CRDs. As mentioned [above](#before-you-uninstall) it is strongly recommended that you
> ensure that there are no remaining ASO resources in the cluster before you run this command.
Use the same URL as you used during installation.

```bash
kubectl delete -f https://github.com/Azure/azure-service-operator/releases/download/v2.0.0/azureserviceoperator_v2.0.0.yaml
kubectl delete -f https://github.com/Azure/azure-service-operator/releases/download/v2.3.0/azureserviceoperator_v2.3.0.yaml
```

0 comments on commit f7e18f1

Please sign in to comment.