Last active
January 23, 2019 02:39
-
-
Save zshi-redhat/f93582ce2d1477073ebf3083ecaf94a1 to your computer and use it in GitHub Desktop.
Multus-upgrade-pod-stability-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# scale up and down pod replicas | |
# sleep time is to ensure pods are created or deleted successfully | |
while true | |
do | |
oc scale --replicas 1 deployment/multus-test-deployment >/dev/null | |
sleep 20 | |
oc scale --replicas 6 deployment/multus-test-deployment >/dev/null | |
sleep 20 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is executed on one of the worker nodes | |
# It simulates the copy action of Multus upgrade in an interval of 1s | |
# nfvpe_multus & official_multus are two multus images with different size but equal function | |
while true | |
do | |
cp -f nfvpe_multus multus | |
sleep 1 | |
cp -f official_multus multus | |
sleep 1 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: multus-test-deployment | |
labels: | |
app: multus-test-app | |
spec: | |
replicas: 6 | |
selector: | |
matchLabels: | |
app: multus-test-app | |
template: | |
metadata: | |
labels: | |
app: multus-test-app | |
spec: | |
containers: | |
- name: multus-app | |
image: centos/tools | |
imagePullPolicy: IfNotPresent | |
command: [ "/bin/bash", "-c", "--" ] | |
args: [ "while true; do sleep 300000; done;" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment