Skip to content

Commit

Permalink
Merge pull request eclipse-tractusx#661 from eclipse-tractusx/docs/en…
Browse files Browse the repository at this point in the history
…hance_trg_3-02

docs: enhance trg 3 02
  • Loading branch information
tomaszbarwicki authored Feb 27, 2024
2 parents f77dc03 + bb0d7b3 commit 5de589f
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions docs/release/trg-3/trg-3-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ In cases where data has to be persisted (database, uploaded files etc.), Kuberne

Using stateful data requires additional caution to not lose data by accident. Therefore, when a pod/deployment/statefulset resource is removed, data will still be available on the StorageClass's disk that was used.

Persistent Volumes can have different reclaim policies, such as "Retain," "Recycle," and "Delete". The default reclaim policy is set to "Delete" for dynamically provisioned PVs. This implies that provisioned persistent volume gets automatically erased when a user removes the associated PersistentVolumeClaim. However, this automated deletion might not be suitable, especially if the volume contains valuable data. In such scenarios, opting for the "Retain" policy is more fitting. With the "Retain" policy, deleting a PersistentVolumeClaim won't result in the corresponding PersistentVolume being deleted, allowing users to manually recover all of its data.

## How

Example PersistentVolumeClaim:
Expand Down Expand Up @@ -52,23 +54,3 @@ This can be referenced in the volumes section of a Pod/Deployment/StatefulSet re
It is not recommended to directly request the claim in a StatefulSet! Rather create the PVC separately and reference that as an existing claim. See the example in [Bitnami's Postgresql chart](https://github.com/bitnami/charts/tree/main/bitnami/postgresql) where an existing claim can be referenced for the primary database at the [primary.persistence.existingClaim property](https://github.com/bitnami/charts/tree/main/bitnami/postgresql#postgresql-primary-parameters).

:::

### How to expand volume in Kubernetes with ArgoCD

1. Open **ArgoCD** in the desired environment and find the application
1. Delete all Pod's that are attached to the volume. This also can be achieved by **scaling a StatefulSet to 0 replicas**
1. Find the desired PersistenceVolumeClaim resource, click on it and press **Edit**
1. Change the **spec.resource.requests.storage** property's value to the desired size
1. Save the changes and wait for them to take effect.
This can be found in the PVC's status section:

```yaml
status:
accessModes:
- ReadWriteOnce
capacity:
storage: 16Gi # DESIRED SIZE
phase: Bound
```
1. Scale back the StatefulSet to the original replica count

0 comments on commit 5de589f

Please sign in to comment.