#!/bin/bash

if [ "$1" = "i" ]
then
	kubectl apply -f ./preparaWordpress/wp-namespace.yaml
	kubectl apply -f ./preparaWordpress/pv-local-mysql.yaml
	kubectl apply -f ./preparaWordpress/pv-local-wordpress.yaml
	helm install wordpress wordpress-chart/
else
	helm uninstall wordpress 
	kubectl delete -f ./preparaWordpress/wp-namespace.yaml
	kubectl delete -f ./preparaWordpress/pv-local-mysql.yaml
	kubectl delete -f ./preparaWordpress/pv-local-wordpress.yaml
fi
