Skip to content

Commit 03f8963

Browse files
committed
docs: documenting upgrade procedure for v0.3.0
1 parent 0eff100 commit 03f8963

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

docs/content/guides/upgrading.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
List of Tenant API changes:
44

55
- [Capsule v0.1.0](https://github.com/clastix/capsule/releases/tag/v0.1.0) bump to `v1beta1` from `v1alpha1`.
6-
- [Capsule v0.2.0](https://github.com/clastix/capsule/releases/tag/v0.1.0) bump to `v1beta2` from `v1beta1`, deprecating `v1alpha1`.
6+
- [Capsule v0.2.0](https://github.com/clastix/capsule/releases/tag/v0.2.0) bump to `v1beta2` from `v1beta1`, deprecating `v1alpha1`.
7+
- [Capsule v0.3.0](https://github.com/clastix/capsule/releases/tag/v0.3.0) missing enums required by [Capsule Proxy](https://github.com/clastix/capsule-proxy).
78

89
This document aims to provide support and a guide on how to perform a clean upgrade to the latest API version in order to avoid service disruption and data loss.
910

@@ -14,6 +15,55 @@ As an installation method, Helm is given for granted, YMMV using the `kustomize`
1415
We strongly suggest performing a full backup of your Kubernetes cluster, such as storage and etcd.
1516
Use your favourite tool according to your needs.
1617

18+
# Upgrading from v0.2.x to v0.3.x
19+
20+
A minor bump has been requested due to some missing enums in the Tenant resource.
21+
22+
## Scale down the Capsule controller
23+
24+
Using the `kubectl` or Helm, scale down the Capsule controller manager: this is required to avoid the old Capsule version from processing objects that aren't yet installed as a CRD.
25+
26+
```
27+
helm upgrade -n capsule-system capsule --set "replicaCount=0"
28+
```
29+
30+
## Patch the Tenant custom resource definition
31+
32+
Unfortunately, Helm doesn't manage the lifecycle of Custom Resource Definitions, additional details can be found [here](https://github.com/helm/community/blob/f9e06c16d89ccea1bea77c01a6a96ae3b309f823/architecture/crds.md).
33+
34+
This process must be executed manually as follows:
35+
36+
```
37+
kubectl apply -f https://raw.githubusercontent.com/clastix/capsule/v0.3.0/config/crd/bases/tenant-crd.yaml
38+
```
39+
40+
## Update your Capsule Helm chart
41+
42+
Ensure to update the Capsule repository to fetch the latest changes.
43+
44+
```
45+
helm repo update
46+
```
47+
48+
The latest Chart must be used, at the current time, >=0.4.0 is expected for Capsule >=v0.3.0, you can fetch the full list of available charts with the following command.
49+
50+
```
51+
helm search repo -l clastix/capsule
52+
```
53+
54+
Since the Tenant custom resource definition has been patched with new fields, we can install back Capsule using the provided Helm chart.
55+
56+
```
57+
helm upgrade --install capsule clastix/capsule -n capsule-system --create-namespace --version 0.4.0
58+
```
59+
60+
This will start the Operator with the latest changes, and perform the required sync operations like:
61+
62+
1. Ensuring the CA is still valid
63+
2. Ensuring a TLS certificate is valid for the local webhook server
64+
3. If not using the cert-manager integration, patching the Validating and Mutating Webhook Configuration resources with the Capsule CA
65+
4. If not using the cert-manager integration, patching the Capsule's Custom Resource Definitions conversion webhook fields with the Capsule CA
66+
1767
# Upgrading from v0.1.3 to v0.2.x
1868

1969
## Scale down the Capsule controller

0 commit comments

Comments
 (0)