|
| 1 | +# Upgrade Guide |
| 2 | + |
| 3 | +This guide provides instructions for upgrading the Scality S3 CSI Driver to newer versions. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +Before upgrading, ensure all requirements outlined in the **[Prerequisites](prerequisites.md)** guide are met for the target version. |
| 8 | + |
| 9 | +## Pre-Upgrade Steps |
| 10 | + |
| 11 | +**Step 1. Set namespace variable:** |
| 12 | + |
| 13 | +Set the namespace where the driver is currently installed: |
| 14 | + |
| 15 | +```bash |
| 16 | +export NAMESPACE="scality-s3-csi" # Replace with your actual namespace |
| 17 | +``` |
| 18 | + |
| 19 | +**Step 2. Check current installation:** |
| 20 | + |
| 21 | +```bash |
| 22 | +# Get current release info |
| 23 | +helm list --all-namespaces | grep scality-mountpoint-s3-csi-driver |
| 24 | + |
| 25 | +# Check current version |
| 26 | +kubectl get pods -n ${NAMESPACE} -l app.kubernetes.io/name=scality-mountpoint-s3-csi-driver -o jsonpath='{.items[0].spec.containers[0].image}' |
| 27 | +``` |
| 28 | + |
| 29 | +**Step 3. Review changes:** |
| 30 | + |
| 31 | +Check the [Release Notes](../release-notes.md) for version-specific changes and breaking changes. |
| 32 | + |
| 33 | +**Step 4. Dry run upgrade (recommended):** |
| 34 | + |
| 35 | +```bash |
| 36 | +# Test upgrade without applying changes |
| 37 | +helm upgrade scality-mountpoint-s3-csi-driver \ |
| 38 | + oci://ghcr.io/scality/mountpoint-s3-csi-driver/helm-charts/scality-mountpoint-s3-csi-driver \ |
| 39 | + --namespace ${NAMESPACE} \ |
| 40 | + --reuse-values \ |
| 41 | + --dry-run |
| 42 | +``` |
| 43 | + |
| 44 | +## Upgrade Options |
| 45 | + |
| 46 | +!!! warning |
| 47 | + If any application pods using the S3 buckets as filesystems are restarted during the upgrade they will lose access to the buckets. |
| 48 | + Once the upgrade is complete, the application pods will automatically regain access to the buckets. |
| 49 | + |
| 50 | +Choose one of the following upgrade options: |
| 51 | + |
| 52 | +### Option A: Upgrade with Default Values |
| 53 | + |
| 54 | +For installations using existing configuration: |
| 55 | + |
| 56 | +```bash |
| 57 | +helm upgrade scality-mountpoint-s3-csi-driver \ |
| 58 | + oci://ghcr.io/scality/mountpoint-s3-csi-driver/helm-charts/scality-mountpoint-s3-csi-driver \ |
| 59 | + --namespace ${NAMESPACE} \ |
| 60 | + --reuse-values |
| 61 | +``` |
| 62 | + |
| 63 | +### Option B: Upgrade with Custom Values |
| 64 | + |
| 65 | +For installations with custom configuration file: |
| 66 | + |
| 67 | +```bash |
| 68 | +helm upgrade scality-mountpoint-s3-csi-driver \ |
| 69 | + oci://ghcr.io/scality/mountpoint-s3-csi-driver/helm-charts/scality-mountpoint-s3-csi-driver \ |
| 70 | + --values values-production.yaml \ |
| 71 | + --namespace ${NAMESPACE} |
| 72 | +``` |
| 73 | + |
| 74 | +## Post-Upgrade Verification |
| 75 | + |
| 76 | +**Step 1. Check upgrade status:** |
| 77 | + |
| 78 | +```bash |
| 79 | +helm status scality-mountpoint-s3-csi-driver -n ${NAMESPACE} |
| 80 | +``` |
| 81 | + |
| 82 | +**Step 2. Verify pods are running:** |
| 83 | + |
| 84 | +```bash |
| 85 | +kubectl get pods -n ${NAMESPACE} -l app.kubernetes.io/name=scality-mountpoint-s3-csi-driver |
| 86 | +``` |
| 87 | + |
| 88 | +**Step 3. Check driver version:** |
| 89 | + |
| 90 | +```bash |
| 91 | +kubectl get pods -n ${NAMESPACE} -l app.kubernetes.io/name=scality-mountpoint-s3-csi-driver -o jsonpath='{.items[0].spec.containers[0].image}' |
| 92 | +``` |
| 93 | + |
| 94 | +## Rollback (If Needed) |
| 95 | + |
| 96 | +!!! warning |
| 97 | + If any application pods using the S3 buckets as filesystems are restarted during the rollback they will lose access to the buckets. |
| 98 | + Once the rollback is complete, the application pods will automatically regain access to the buckets. |
| 99 | + |
| 100 | +If issues occur after upgrade you can rollback to the previous version using the following steps: |
| 101 | + |
| 102 | +```bash |
| 103 | +# Check rollback history |
| 104 | +helm history scality-mountpoint-s3-csi-driver -n ${NAMESPACE} |
| 105 | + |
| 106 | +# Rollback to previous version |
| 107 | +helm rollback scality-mountpoint-s3-csi-driver -n ${NAMESPACE} |
| 108 | +``` |
| 109 | + |
| 110 | +## Troubleshooting |
| 111 | + |
| 112 | +These are quick checks to verify the upgrade was successful. For detailed troubleshooting, refer to the [troubleshooting guide](../troubleshooting.md). |
| 113 | + |
| 114 | +**Check pod status:** |
| 115 | + |
| 116 | +The driver pod should be in a `Running` state. |
| 117 | + |
| 118 | +```bash |
| 119 | +kubectl describe pods -n ${NAMESPACE} -l app.kubernetes.io/name=scality-mountpoint-s3-csi-driver |
| 120 | +``` |
| 121 | + |
| 122 | +**Check CSI driver registration:** |
| 123 | + |
| 124 | +```bash |
| 125 | +kubectl get csidriver s3.csi.scality.com |
| 126 | +``` |
0 commit comments