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

Add support to Tolerations & nodeSelect to the restore phase with velero/velero-restore-helper #563

Open
didier-segura opened this issue Apr 5, 2024 · 1 comment
Labels

Comments

@didier-segura
Copy link

didier-segura commented Apr 5, 2024

Hi,

The issue : "I can't restore a backup from a FSB S3 bucket (fr-par-1) to another region (by example : fr-par-2)."

Let me explain more.

We have a cluster with 2 node group to handle legacy application with one pod / one pvc in RWO.

To control the pod repartition we have added a toleration like this, so legacy application without this key "multiaz" can't start in the other zone "fr-par-2" :

`tolerations:

  • key: "multiaz"
    operator: "Equal"
    value: "true"
    effect: "NoSchedule"`

I can't find any element to setup this toleration when the velero start the restore process.

image

So the pod in the restore-wait phase can't start without this Toleration define.

I have added the "Toleration" to the NodeGroup by the way.

I have also added the JSON patch that apply correctly :

`version: v1
resourceModifierRules:

  • conditions:
    groupResource: statefulsets.apps
    patches:
    • operation: add
      path: "/metadata/labels/changeZone"
      value: "fr-par-2"
    • operation: add
      path: "/spec/template/spec/nodeSelector"
      value: '{ "topology.kubernetes.io/zone": "fr-par-2" }'
    • operation: add
      path: "/spec/template/spec/tolerations"
      value: '[{"key": "multiaz", "operator": "Equal", "value": "true", "effect": "NoSchedule"}]'
  • conditions:
    groupResource: persistentvolumeclaims
    patches:
    • operation: replace
      path: "/spec/storageClassName"
      value: "scw-bssd-retain-fr-par-2"
      `

The PVC are well setup in new zone "fr-par-2", but the pod restoration are in Pending state because they don't have the Toleration key "multiaz:true", and if I kill the pod in this restore stage, the new pod start correctly in fr-par-2 with an empty volume (which is "normal").

Is it possible to add this ability (tolerations) into the velero chart somewhere ? or in the ConfigMap logic ?

Best regards !

@jenting jenting added the velero label May 13, 2024
@jenting
Copy link
Collaborator

jenting commented May 13, 2024

@qiuming-best do you know velero restore helper supports above scenario?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants