chore(openreplaycli): Adding installation via helm
Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com>
This commit is contained in:
parent
c642da11d3
commit
f8c1c6f286
1 changed files with 10 additions and 4 deletions
|
|
@ -51,7 +51,8 @@ EOF
|
|||
[ -d | --status ]
|
||||
[ -v | --verbose ]
|
||||
[ -l | --logs SERVICE ]
|
||||
[ -i | --install SERVICE ]
|
||||
[ -i | --legacy-install SERVICE ]
|
||||
[ -I | --helm-install SERVICE ]
|
||||
[ -s | --stop SERVICE|all ]
|
||||
[ -S | --start SERVICE|all ]
|
||||
[ -r | --restart SERVICE|all ]"
|
||||
|
|
@ -103,10 +104,14 @@ restart() {
|
|||
kubectl rollout restart -n app deployment $1-openreplay
|
||||
}
|
||||
|
||||
install() {
|
||||
legacyInstall() {
|
||||
bash kube-install.sh --app $1
|
||||
}
|
||||
|
||||
helmInstall() {
|
||||
helm upgrade --install openreplay helmv2/openreplay -f helmv2/vars.yaml
|
||||
}
|
||||
|
||||
upgrade() {
|
||||
sed -i "s/tag:.*/ tag: 'latest'/g" ./app/$1.yaml
|
||||
}
|
||||
|
|
@ -122,7 +127,7 @@ status() {
|
|||
|
||||
[[ $# -eq 0 ]] && usage && exit 1
|
||||
|
||||
PARSED_ARGUMENTS=$(color getopt -a -n openreplay-cli -o vhds:S:l:r:i: --long verbose,help,status,start:,stop:,logs:,restart:,install: -- "$@")
|
||||
PARSED_ARGUMENTS=$(color getopt -a -n openreplay-cli -o vhds:S:l:r:i:I: --long verbose,help,status,start:,stop:,logs:,restart:,legacy-install:,helm-install: -- "$@")
|
||||
VALID_ARGUMENTS=$?
|
||||
if [[ "$VALID_ARGUMENTS" != "0" ]]; then
|
||||
usage
|
||||
|
|
@ -139,7 +144,8 @@ do
|
|||
-S | --start) start $2 ; shift 2 ;;
|
||||
-l | --logs) logs "$2" ; shift 2 ;;
|
||||
-r | --restart) restart "$2" ; shift 2 ;;
|
||||
-i | --install) install "$2" ; shift 2 ;;
|
||||
-i | --legacy-install) legacyInstall "$2" ; shift 2 ;;
|
||||
-I | --helm-install) helmInstall "$2" ; shift 2 ;;
|
||||
# -- means the end of the arguments; drop this, and break out of the while loop
|
||||
--) shift; break ;;
|
||||
# If invalid options were passed, then getopt should have reported an error,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue