Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add Rancher Turtles uninstallation notes #62

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/getting-started/uninstall_turtles_operator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
sidebar_position: 5
---

# Uninstall Rancher Turtles Operator

This gives an overview of Rancher Turtles Operator uninstallation process.

:::caution
When installing Rancher Turtles in your Rancher environment, by default, Rancher Turtles enables the Cluster API Operator cleanup. This includes cleaning up Cluster API Operator specific webhooks and deployments that otherwise cause issues with Rancher provisioning.

To simplify uninstalling Rancher Turtles (via Rancher Manager or helm command), the official Rancher Turtles Helm chart includes a `post-delete` hook that applies these changes, making it transparent to the end user:
- Delete the `mutating-webhook-configuration` and `validating-webhook-configuration` webhooks that are no longer needed.
- Delete the CAPI `deployments` that are no longer needed.
:::

There are two options to uninstall the Rancher Turtles Operator depending on the installation method.

1. Rancher Turtles Operator installed via Rancher Manager (i.e in local cluster, `Apps->Repositories` to add a turtles repository then `Apps->Charts` to install rancher-turtles extension). To uninstall, simply navigate to local cluster, `Apps->Installed Apps`, find `rancher-turtles` extension and click `Delete`.

2. Rancher Turtles Operator installed via [helm command](install_turtles_operator.md). If you would like to uninstall it manually,
it can be simply achieived via `helm`:

```bash
helm uninstall -n rancher-turtles-system rancher-turtles
```

This may take a few minutes to complete.

:::note
Remember that, if you use a different name for the installation or a different namespace, you may need to customize the command for your specific configuration.
:::

Once uninstalled, Rancher's `embedded-cluster-api` feature must be re-enabled:

1. Create a `feature.yaml` file, with `embedded-cluster-api` set to true:
```yaml title="feature.yaml"
apiVersion: management.cattle.io/v3
kind: Feature
metadata:
name: embedded-cluster-api
spec:
value: true
```
2. Use `kubectl` to apply the `feature.yaml` file to the cluster:
```bash
kubectl apply -f feature.yaml
```
5 changes: 4 additions & 1 deletion docs/reference-guides/rancher-turtles-chart/values.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ When installing Rancher Turtles Operator using the official Helm chart, it is po
```yaml
rancherTurtles:
features:
cluster-api-operator:
cleanup: true # indicates that rancher turtles resources are cleaned up after uninstalling (default: true)
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.28.0 # indicates the image to use for post-delete cleanup (default: Kubernetes container image registry)
embedded-capi: # this is a rancher functionality that is not compatible with rancher-turtles
disabled: true # indicates that embedded-capi must be disabled during installation (default: true)
rancher-webhook: # an existing rancher installation keeps rancher webhooks after disabling embedded-capi
cleanup: true # indicates that the remaining rancher webhooks be removed (default: true)
kubectlImage: rancher/kubectl # indicates the image to use for webhook cleanup (default: rancher/kubectl)
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.28.0 # indicates the image to use for pre-install cleanup (default: Kubernetes container image registry)
rancher-kubeconfigs: # with capi 1.5.0 and greater, secrets for kubeconfigs must contain a specific label. See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/book/src/developer/providers/migrations/v1.4-to-v1.5.md#other
label: true # indicates that the label will be added (default: true)
managementv3-cluster: # rancher will use `clusters.management.cattle.io` to represent an imported capi cluster
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const sidebars = {
'getting-started/rancher',
'getting-started/install_capi_operator',
'getting-started/install_turtles_operator',
'getting-started/uninstall_turtles_operator',
{
type: 'category',
label: 'Your first cluster',
Expand Down
Loading