Skip to content

Commit

Permalink
Merge pull request #116 from shaneknapp/add-helm-debug-feature
Browse files Browse the repository at this point in the history
add debug flag to hubploy
  • Loading branch information
shaneknapp authored May 31, 2024
2 parents 08fd8d6 + bb970a9 commit 89199c7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 8 additions & 2 deletions hubploy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@ def main():
action='store_true'
)

argparser.add_argument(
'-d',
'--debug',
action='store_true',
help='Enable helm debug output'
)

args = argparser.parse_args()

try:
Expand All @@ -104,8 +111,6 @@ def main():
print("Specify --commit-range manually, or pass --check-registry", file=sys.stderr)
sys.exit(1)



with auth.registry_auth(args.deployment, args.push, args.check_registry):

all_images = config.get('images', {}).get('images', {})
Expand Down Expand Up @@ -138,6 +143,7 @@ def main():
args.force,
args.atomic,
args.cleanup_on_fail,
args.debug
)

if __name__ == '__main__':
Expand Down
9 changes: 7 additions & 2 deletions hubploy/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def helm_upgrade(
timeout,
force,
atomic,
cleanup_on_fail
cleanup_on_fail,
debug
):
subprocess.check_call([
HELM_EXECUTABLE, 'dep', 'up'
Expand Down Expand Up @@ -89,6 +90,8 @@ def helm_upgrade(
cmd += ['--atomic']
if cleanup_on_fail:
cmd += ['--cleanup-on-fail']
if debug:
cmd += ['--debug']
cmd += itertools.chain(*[['-f', cf] for cf in config_files])
cmd += itertools.chain(*[['--set', v] for v in config_overrides_implicit])
cmd += itertools.chain(*[['--set-string', v] for v in config_overrides_string])
Expand All @@ -106,7 +109,8 @@ def deploy(
timeout=None,
force=False,
atomic=False,
cleanup_on_fail=False
cleanup_on_fail=False,
debug=False
):
"""
Deploy a JupyterHub.
Expand Down Expand Up @@ -180,4 +184,5 @@ def deploy(
force,
atomic,
cleanup_on_fail,
debug,
)

0 comments on commit 89199c7

Please sign in to comment.