Skip to content

Commit

Permalink
fix: restore job uses new statefulset
Browse files Browse the repository at this point in the history
  • Loading branch information
wittdennis committed Nov 27, 2024
1 parent 89210d8 commit 20f148b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
18 changes: 9 additions & 9 deletions in-cluster/custom-resources/argo-workflows/backup-restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
volumes:
- name: foundry-data
persistentVolumeClaim:
claimName: foundry-data-pvc
claimName: data-test-foundryvtt-0
- name: tmp
emptyDir: {}
templates:
Expand All @@ -39,13 +39,13 @@ spec:
- - name: scale-down
arguments:
parameters:
- name: deployment
value: foundry
- name: name
value: test-foundryvtt
- name: replicaCount
value: "0"
templateRef:
template: scale-deployment
name: scale-deployment
template: scale-workload
name: scale-workload
- - name: restore-data
template: restore-data
arguments:
Expand Down Expand Up @@ -195,10 +195,10 @@ spec:
- - name: scale-up
arguments:
parameters:
- name: deployment
value: foundry
- name: name
value: test-foundryvtt
- name: replicaCount
value: "1"
templateRef:
template: scale-deployment
name: scale-deployment
template: scale-workload
name: scale-workload
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: scale-deployment
name: scale-workload
spec:
entrypoint: scale-deployment
entrypoint: scale-workload
artifactGC:
strategy: OnWorkflowDeletion
serviceAccountName: foundry-workflows
Expand All @@ -20,16 +20,19 @@ spec:
arguments:
parameters:
- name: replicaCount
- name: deployment
- name: name
default: foundry
- name: type
default: statefulset
templates:
- name: scale-deployment
- name: scale-workload
serviceAccountName: foundry-workflows
automountServiceAccountToken: true
inputs:
parameters:
- name: replicaCount
- name: deployment
- name: name
- name: type
container:
image: bitnami/kubectl:1.31.3 # renovate
command:
Expand All @@ -39,7 +42,7 @@ spec:
- |
set -eu
kubectl scale --replicas={{inputs.parameters.replicaCount}} -n foundry deployment/{{inputs.parameters.deployment}}
kubectl scale --replicas={{inputs.parameters.replicaCount}} -n foundry {{inputs.parameters.type}}/{{inputs.parameters.name}}
securityContext:
runAsUser: 1000
runAsGroup: 1000
Expand Down

0 comments on commit 20f148b

Please sign in to comment.