Skip to content

Commit

Permalink
making bucket/appVault optional for --v3 deploy chart
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Haigh <[email protected]>
  • Loading branch information
MichaelHaigh committed Apr 26, 2024
1 parent 3391daf commit 2ee44eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 9 additions & 0 deletions tkSrc/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ def main(args, parser, ard):
elif args.objectType == "chart":
if not hasattr(args, "bucket"):
args.bucket = None
if args.v3:
if ard.needsattr("buckets"):
ard.buckets = astraSDK.k8s.getResources(
config_context=args.v3, skip_tls_verify=args.skip_tls_verify
).main("appvaults")
if args.bucket is None:
args.bucket = ard.getSingleDict("buckets", "status.state", "available", parser)[
"metadata"
]["name"]
deployHelm(
args.chart,
helpers.isRFC1123(args.app, parser=parser),
Expand Down
1 change: 0 additions & 1 deletion tkSrc/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,6 @@ def deploy_chart_args(self):
"--appVault",
dest="bucket",
default=None,
required=True,
choices=(None if self.plaidMode else self.acl.buckets),
help="Name of the AppVault to use as the target of the backups/snapshots",
)
Expand Down

0 comments on commit 2ee44eb

Please sign in to comment.