kdebug 0.6.1__tar.gz → 0.6.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kdebug-0.6.1 → kdebug-0.6.3}/PKG-INFO +1 -1
- {kdebug-0.6.1 → kdebug-0.6.3}/pyproject.toml +1 -1
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/cli.py +10 -10
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/completions/_kdebug +1 -1
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/completions/kdebug.bash +1 -1
- {kdebug-0.6.1 → kdebug-0.6.3}/.gitignore +0 -0
- {kdebug-0.6.1 → kdebug-0.6.3}/README.md +0 -0
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/__init__.py +0 -0
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/backup.py +0 -0
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/completions/__init__.py +0 -0
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/completions/kdebug.fish +0 -0
- {kdebug-0.6.1 → kdebug-0.6.3}/src/kdebug/debug.py +0 -0
|
@@ -178,7 +178,7 @@ def validate_cluster_connection(namespace: str) -> Optional[str]:
|
|
|
178
178
|
|
|
179
179
|
Returns None on success, or an error message string on failure.
|
|
180
180
|
"""
|
|
181
|
-
cmd = f"{kubectl_base_cmd()} get
|
|
181
|
+
cmd = f"{kubectl_base_cmd()} get pods -n {namespace} --limit=1 -o name"
|
|
182
182
|
print_debug_command(cmd)
|
|
183
183
|
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
|
|
184
184
|
if result.returncode != 0:
|
|
@@ -914,24 +914,24 @@ def main():
|
|
|
914
914
|
|
|
915
915
|
parser = argparse.ArgumentParser(
|
|
916
916
|
prog="kdebug",
|
|
917
|
-
description="""
|
|
917
|
+
description="""TUI for Kubernetes Debug Containers.
|
|
918
|
+
https://github.com/jessegoodier/kdebug
|
|
918
919
|
|
|
919
920
|
Usage:
|
|
920
|
-
kdebug [options]
|
|
921
|
-
kdebug debug
|
|
922
|
-
kdebug backup
|
|
921
|
+
kdebug [options] Interactive debug (default)
|
|
922
|
+
kdebug debug -h Show debug options
|
|
923
|
+
kdebug backup -h Show backup options""",
|
|
923
924
|
formatter_class=KdebugHelpFormatter,
|
|
924
925
|
epilog="""Examples:
|
|
925
926
|
kdebug # Interactive TUI
|
|
926
|
-
kdebug -n prod
|
|
927
|
-
kdebug debug --
|
|
928
|
-
kdebug backup --pod web-0 --container-path /app/config # Backup files
|
|
929
|
-
kdebug backup --pod web-0 --container-path /var/data --local-path ./my-backups/{namespace}/{pod}""",
|
|
927
|
+
kdebug -n prod # TUI, different namespace
|
|
928
|
+
kdebug debug --cmd sh --debug-image docker.io/busybox # TUI, with sh/busybox
|
|
929
|
+
kdebug backup --pod web-0 --container-path /app/config # Backup files""",
|
|
930
930
|
)
|
|
931
931
|
|
|
932
932
|
# Version flag
|
|
933
933
|
parser.add_argument(
|
|
934
|
-
"-
|
|
934
|
+
"-v", "--version", action="version", version=f"%(prog)s {__version__}"
|
|
935
935
|
)
|
|
936
936
|
|
|
937
937
|
# Shared arguments (on main parser so bare `kdebug --pod foo` works)
|
|
@@ -71,7 +71,7 @@ _kdebug_controllers() {
|
|
|
71
71
|
_kdebug() {
|
|
72
72
|
local -a shared_args
|
|
73
73
|
shared_args=(
|
|
74
|
-
'(-
|
|
74
|
+
'(-v --version)'{-v,--version}'[Show version and exit]'
|
|
75
75
|
'(-h --help)'{-h,--help}'[Show help message]'
|
|
76
76
|
'--pod[Pod name for direct selection]:pod:_kdebug_pods'
|
|
77
77
|
'--controller[Controller as TYPE/NAME]:controller:_kdebug_controllers'
|
|
@@ -103,7 +103,7 @@ _kdebug() {
|
|
|
103
103
|
|
|
104
104
|
local shared_opts="--pod --controller -n --namespace --context --kubeconfig
|
|
105
105
|
--container --debug-image --as-root
|
|
106
|
-
--debug --completions -
|
|
106
|
+
--debug --completions -v --version --help -h"
|
|
107
107
|
|
|
108
108
|
local debug_opts="--cmd --cd-into"
|
|
109
109
|
local backup_opts="--container-path --local-path --compress --tar-exclude"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|