#!/bin/bash -eux

kubectl get psmdb -A
for ns in `kubectl get psmdb -A | grep -v cluster | grep chat | cut -d" " -f1`; do
  cd $ns/chat
  libre apply ../../common/rocketchat/manifests/backup/mongo-operator-v1-5-0.yml
  libre apply ../../common/rocketchat/manifests/backup/mongo-v1-5-0.yml
  cd ../..
done
