This commit is contained in:
Jemin Seo 2025-05-19 20:01:03 +05:30 committed by GitHub
commit f9e1457392
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -69,7 +69,9 @@ function kubernetesBlankCanvasTemplate(
name: '', name: '',
image: `${imageRegistry.repo}/k8s:2.11.0`, image: `${imageRegistry.repo}/k8s:2.11.0`,
command: ['sh', '-c'], command: ['sh', '-c'],
args: ['kubectl apply -f /tmp/ -n {{workflow.parameters.adminModeNamespace}} && sleep 30'] args: [
'kubectl delete chaosexperiments -n {{workflow.parameters.adminModeNamespace}} --all && kubectl apply -f /tmp/ -n {{workflow.parameters.adminModeNamespace}} && faultCount=$(ls /tmp/ | grep -E "(.yaml$|.yml$)" | wc -l) && until [[ $(kubectl get -f /tmp/ --no-headers | wc -l) -eq $faultCount ]]; do sleep 1; kubectl apply -f /tmp/ -n {{workflow.parameters.adminModeNamespace}} ; done; echo "ChaosExperiment CR Ready"',
]
} }
}, },
{ {