...

Text file src/edge-infra.dev/hack/datasync/cleanup.sh

Documentation: edge-infra.dev/hack/datasync

     1#!/bin/bash
     2
     3kubectl -n warehouse-system scale --replicas=0 deployment/lumperctl
     4
     5kubectl delete CouchDBServer -n data-sync-couchdb --all
     6kubectl delete CouchDBReplicationSet -n data-sync-couchdb --all
     7kubectl delete CouchDBDatabase -n data-sync-couchdb --all
     8
     9kubectl patch CouchDBUser -n data-sync-couchdb store-server --type=merge -p '{"metadata":{"finalizers":null}}'
    10
    11kubectl delete CouchDBUser -n data-sync-couchdb --all
    12kubectl -n couchctl scale --replicas=0 deployment/couchctl
    13
    14kubectl delete sts -n data-sync-couchdb --all
    15kubectl delete ConfigMap -n data-sync-couchdb data-sync-couchdb 
    16
    17kubectl patch pvc database-storage-data-sync-couchdb-0 -n data-sync-couchdb -p '{"metadata":{"finalizers":null}}'
    18
    19kubectl delete pvc -n data-sync-couchdb --all
    20
    21kubectl get pv | grep couchdb
    22
    23kubectl apply -f ./config/pallets/edge/datasync/couchdb/generic/couchdb-server.yaml -n data-sync-couchdb
    24kubectl -n couchctl scale --replicas=1 deployment/couchctl

View as plain text