Last active
December 7, 2020 01:56
-
-
Save stnet253/cf311e6cbf0b7c899a1c8ec69240a3ab to your computer and use it in GitHub Desktop.
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
sh add_hap.sh 3001 |
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
. | |
├── README | |
└── sh | |
├── add_hap.sh | |
├── game-gs3001-hpa.yaml | |
└── tmp | |
└── game-gsxxxx-hpa.yaml | |
2 directories, 4 files |
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 | |
if [ -n "$1" ];then | |
cp ./tmp/game-gsxxxx-hpa.yaml game-gs$1-hpa.yaml | |
sed -i '' "s/xxxx/$1/g" game-gs$1-hpa.yaml | |
else | |
echo "It's NULL,Please key in config gorup" | |
echo "$0 3001 " | |
fi |
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: autoscaling/v1 | |
kind: HorizontalPodAutoscaler | |
metadata: | |
name: game-gsxxxx-hpa | |
spec: | |
scaleTargetRef: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: game-gsxxxx | |
minReplicas: 1 | |
maxReplicas: 2 | |
targetCPUUtilizationPercentage: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment