Post-restore execution hook to scale one or multiple deployments down or up after a restore or clone operation.
args: [<deployment>=<# of replicas> <deployment>=<# of replicas> ... <deployment>=<# of replicas>]
The arguments are explained below:
<deployment>=<number of replicas>: Deployment to scale up or down and new number of replicas (>=0), separate each <deployment>=<replicas> pair by blanks.
| Action/Operation | Supported Stages | Notes |
|---|---|---|
| Restore | post | Scale specified deployments to the specified number of replicas after restore |
To add an execution hook for post-restore image URL rewrites, you will need to:
- Update the
scale-infra.yamldefinition to match the namespace of your application.- Optionally update any labels in the same definition to better align with your business practices.
- Apply the
scale-infra.yamldefinition to your application namespace. - Add the
post-restore-scale.shscript to your Astra Control environment. - Create an execution hook within your Astra Control application with the following settings:
- Operation:
Post-restore - Hook Arguments: <deployment>=<replicas>
- Hook filter:
Container name:alpine-astra-hook
- Operation:
- Verify the
alpine:latestcontainer is matched. - Take a snapshot and/or backup of your application.
- Perform a clone or restore operation.