#!/bin/bash

if [ -z "$1" ]
then
	echo "Falta nombre del chart"
else

chart=`echo $1 | cut -f1 -d-`

if [ "$2" = "i" ]
then
	helm install $chart ./$1 --namespace=$chart --create-namespace
elif [ "$2" = "u" ]
then
	helm uninstall $chart -n $chart
else
	echo "Falta comando: i=instalar, u=desinstalar"
fi
fi
