# capture current state in prod
kubectl get deployment coturn-dns -o yaml --namespace coturn-dns > existing-production-deployment.yaml

# capture current state in relese
kubectl get deployment coturn-dns -o yaml --namespace coturn-dns > existing-staging-deployment.yaml


KUBECONFIG=stg
cd k8s/coturn-dns
kubectl delete secret gcr-json-key -n coturn-dns
kubectl delete ClusterRole pods-list  --namespace coturn-dns
kubectl delete ClusterRoleBinding pods-list  --namespace coturn-dns
kubectl delete deployment coturn-dns  -n coturn-dns

ENV=production/staging
helm upgrade --install coturn-dns . --values values-$ENV.yaml --namespace coturn-dns
