mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-01-27 18:20:05 +00:00
Allow to define labels that will be assigned to a postgres instance pod when in 'initializing new cluster', 'running custom bootstrap script', 'starting after custom bootstrap', or 'creating replica' state
19 lines
505 B
Python
Executable File
19 lines
505 B
Python
Executable File
#!/usr/bin/env python
|
|
import argparse
|
|
import shutil
|
|
|
|
from time import sleep
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--datadir", required=True)
|
|
parser.add_argument("--sourcedir", required=True)
|
|
parser.add_argument("--test-argument", required=True)
|
|
parser.add_argument("--sleep", required=False, type=int)
|
|
args, _ = parser.parse_known_args()
|
|
|
|
if args.sleep:
|
|
sleep(args.sleep)
|
|
|
|
shutil.copytree(args.sourcedir, args.datadir)
|