This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*nat | |
-N DOCKER | |
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER | |
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER | |
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE | |
-A DOCKER -i docker0 -j RETURN | |
COMMIT | |
*filter | |
-N DOCKER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
phase=${1:-Release} | |
patch='{"metadata":{"annotations":{"volume.pingcap.com/pvManualDeleted":"true","volume.pingcap.com/pvTombstoned":"true"}}}' | |
pvs=`kubectl get pv|grep ${phase}|cut -d' ' -f1` | |
for pv in ${pvs} | |
do | |
echo "start to patch release phase pv: ${pv}" | |
kubectl patch pv/${pv} --patch ${patch} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
function backup_rocksdb { | |
src_dir=$1 | |
dst_dir=$2 | |
mkdir -p $dst_dir | |
for path in $src_dir/* | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -xe | |
ns=${1:-} | |
mode=${2:-debug} | |
if [[ ${mode} == debug ]] | |
then | |
patch='{"metadata":{"labels":{"runmode":"debug"}}}' | |
else | |
patch='{"metadata":{"labels":{"runmode":"normal"}}}' | |
fi |