diff --git a/helm/pv-migrate/Chart.yaml b/helm/pv-migrate/Chart.yaml index 61e52a4a3..0bab2ed4a 100644 --- a/helm/pv-migrate/Chart.yaml +++ b/helm/pv-migrate/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: pv-migrate description: The helm chart of pv-migrate type: application -version: 0.3.0 -appVersion: 0.3.0 +version: 0.4.0 +appVersion: 0.4.0 home: https://github.com/utkuozdemir/pv-migrate keywords: - pv-migrate diff --git a/helm/pv-migrate/README.md b/helm/pv-migrate/README.md index 87ab61426..63762ea1e 100644 --- a/helm/pv-migrate/README.md +++ b/helm/pv-migrate/README.md @@ -1,6 +1,6 @@ # pv-migrate -![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.3.0](https://img.shields.io/badge/AppVersion-0.3.0-informational?style=flat-square) +![Version: 0.4.0](https://img.shields.io/badge/Version-0.4.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.4.0](https://img.shields.io/badge/AppVersion-0.4.0-informational?style=flat-square) The helm chart of pv-migrate @@ -31,6 +31,7 @@ The helm chart of pv-migrate | rsync.image.repository | string | `"docker.io/utkuozdemir/pv-migrate-rsync"` | Rsync image repository | | rsync.image.tag | string | `"1.0.0"` | Rsync image tag | | rsync.imagePullSecrets | list | `[]` | Rsync image pull secrets | +| rsync.maxRetries | int | `10` | Number of retries to run rsync command | | rsync.namespace | string | `""` | Namespace to run Rsync pod in | | rsync.networkPolicy.enabled | bool | `false` | Enable Rsync network policy | | rsync.nodeName | string | `""` | The node name to schedule Rsync pod on | @@ -43,6 +44,7 @@ The helm chart of pv-migrate | rsync.pvcMounts | list | `[]` | PVC mounts into the Rsync pod. For examples, see [values.yaml](values.yaml) | | rsync.resources | object | `{}` | Rsync pod resources | | rsync.restartPolicy | string | `"Never"` | | +| rsync.retryPeriodSeconds | int | `5` | Waiting time between retries | | rsync.securityContext | object | `{}` | Rsync deployment security context | | rsync.serviceAccount.annotations | object | `{}` | Rsync service account annotations | | rsync.serviceAccount.create | bool | `true` | Create a service account for Rsync | @@ -79,4 +81,4 @@ The helm chart of pv-migrate | sshd.tolerations | list | see [values.yaml](values.yaml) | SSHD pod tolerations | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) +Autogenerated from chart metadata using [helm-docs v1.11.2](https://github.com/norwoodj/helm-docs/releases/v1.11.2) diff --git a/helm/pv-migrate/templates/rsync/job.yaml b/helm/pv-migrate/templates/rsync/job.yaml index a8e3647a6..25599252b 100644 --- a/helm/pv-migrate/templates/rsync/job.yaml +++ b/helm/pv-migrate/templates/rsync/job.yaml @@ -36,13 +36,14 @@ spec: set -x n=0 rc=1 - retries=10 + retries={{ .Values.rsync.maxRetries }} + period={{ .Values.rsync.retryPeriodSeconds }} until [ "$n" -ge "$retries" ] do {{ required ".Values.rsync.command is required!" .Values.rsync.command }} {{ .Values.rsync.extraArgs }} && rc=0 && break n=$((n+1)) - echo "rsync attempt $n/10 failed, waiting 5 seconds before trying again" - sleep 5 + echo "rsync attempt $n/$retries failed, waiting $period seconds before trying again" + sleep $period done if [ $rc -ne 0 ]; then diff --git a/helm/pv-migrate/values.yaml b/helm/pv-migrate/values.yaml index df9afe2f3..263123912 100644 --- a/helm/pv-migrate/values.yaml +++ b/helm/pv-migrate/values.yaml @@ -146,6 +146,10 @@ rsync: privateKeyMountPath: /root/.ssh/id_ed25519 # -- The private key content privateKey: "" + # -- Number of retries to run rsync command + maxRetries: 10 + # -- Waiting time between retries + retryPeriodSeconds: 5 # -- Full Rsync command and flags command: "" # -- Extra args to be appended to the rsync command. Setting this might cause the tool to not function properly. diff --git a/migrator/helm-chart.tgz b/migrator/helm-chart.tgz index 53c7cd435..1fea13c01 100644 Binary files a/migrator/helm-chart.tgz and b/migrator/helm-chart.tgz differ