(args: argparse.Namespace)
| 100 | |
| 101 | |
| 102 | def run(args: argparse.Namespace): |
| 103 | acquire( |
| 104 | "orchestratord", |
| 105 | dev=args.dev, |
| 106 | cluster=args.kind_cluster_name, |
| 107 | ) |
| 108 | |
| 109 | try: |
| 110 | subprocess.check_output( |
| 111 | ["helm", "status", "orchestratord", f"--namespace={args.namespace}"] |
| 112 | ) |
| 113 | command = "upgrade" |
| 114 | except: |
| 115 | command = "install" |
| 116 | |
| 117 | helm_args = [ |
| 118 | "helm", |
| 119 | command, |
| 120 | "orchestratord", |
| 121 | "misc/helm-charts/operator", |
| 122 | "--atomic", |
| 123 | f"--set=operator.image.tag={DEV_IMAGE_TAG}", |
| 124 | f"--set=operator.image.repository={image_registry()}/orchestratord", |
| 125 | "--create-namespace", |
| 126 | f"--namespace={args.namespace}", |
| 127 | ] |
| 128 | if args.values is not None: |
| 129 | helm_args.extend(["--values", args.values]) |
| 130 | if args.set is not None: |
| 131 | helm_args.extend([f"--set={v}" for v in args.set]) |
| 132 | subprocess.check_call(helm_args) |
| 133 | |
| 134 | |
| 135 | def reset(args: argparse.Namespace): |
nothing calls this directly
no test coverage detected