kaqing 2.0.92__tar.gz → 2.0.94__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.
Potentially problematic release.
This version of kaqing might be problematic. Click here for more details.
- {kaqing-2.0.92 → kaqing-2.0.94}/PKG-INFO +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/apps.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/batch.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/check_utils.py +4 -4
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/compactionstats.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/cpu.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/disk.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/gossip.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/memory.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/status.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/bash.py +4 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cd.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cli_commands.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/commands_utils.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cql/cql_utils.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/code_utils.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/deploy_pod.py +6 -6
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/deploy_utils.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/undeploy_pod.py +4 -4
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/logs.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/ls.py +4 -4
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/medusa/medusa_backup.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/medusa/medusa_restore.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/medusa/medusa_show_backupjobs.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/medusa/medusa_show_restorejobs.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/nodetool.py +6 -14
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/postgres_session.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_restart.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_session.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/repair/repair_log.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/repair/repair_run.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/repair/repair_scan.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/repair/repair_stop.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/restart.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/rollout.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_app_id.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_cassandra_status.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_cassandra_version.py +3 -3
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_processes.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_repairs.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_storage.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/watch.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/config.py +2 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/repl.py +2 -2
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/repl_state.py +4 -4
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/cred_cache.py +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/idp.py +1 -1
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/cassandra_clusters.py +1 -1
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/cassandra_nodes.py +10 -3
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/deployment.py +2 -2
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/pods.py +10 -4
- kaqing-2.0.94/adam/version.py +5 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/kaqing.egg-info/PKG-INFO +1 -1
- {kaqing-2.0.92 → kaqing-2.0.94}/kaqing.egg-info/SOURCES.txt +15 -15
- {kaqing-2.0.92 → kaqing-2.0.94}/setup.py +1 -1
- kaqing-2.0.92/adam/version.py +0 -5
- {kaqing-2.0.92 → kaqing-2.0.94}/README +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/app_session.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/check.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/check_context.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/check_result.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/checks/issue.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/cli.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/cli_group.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/column.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/columns.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/compactions.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/cpu.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/dir_data.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/dir_snapshots.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/gossip.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/host_id.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/memory.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/node_address.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/node_load.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/node_owns.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/node_status.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/node_tokens.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/node_utils.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/pod_name.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/volume_cassandra.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/columns/volume_root.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/alter_tables.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/app.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/app_ping.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/audit/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/audit/audit.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/audit/audit_repair_tables.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/check.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/command.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/command_helpers.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cp.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cql/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cql/cql_completions.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cql/cql_table_completer.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/cql/cqlsh.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/code_start.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/code_stop.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/deploy.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/deploy_frontend.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/deploy_pg_agent.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/undeploy.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/undeploy_frontend.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/deploy/undeploy_pg_agent.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/describe/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/describe/describe.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/describe/describe_keyspace.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/describe/describe_keyspaces.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/describe/describe_table.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/describe/describe_tables.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/devices.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/exit.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/help.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/issues.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/login.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/medusa/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/medusa/medusa.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/nodetool_commands.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/param_get.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/param_set.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/postgres.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/postgres_ls.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/postgres_preview.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/postgres_utils.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/psql_completions.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/postgres/psql_table_completer.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/preview_table.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/pwd.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_forward.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_forward_stop.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_run_abort.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_runs.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_runs_abort.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_schedule_activate.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_schedule_start.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_schedule_stop.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_schedules.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/reaper/reaper_status.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/repair/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/repair/repair.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/report.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/shell.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_adam.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_app_actions.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_app_queues.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_commands.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_host.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_login.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/commands/show/show_params.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/embedded_apps.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/embedded_params.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/log.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/pod_exec_result.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/repl_commands.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/repl_session.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/sql}/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sql/sql_completer.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sql/state_machine.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sql/term_completer.py +0 -0
- {kaqing-2.0.92/adam/sql → kaqing-2.0.94/adam/sso}/__init__.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/authenticator.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/authn_ad.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/authn_okta.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/id_token.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/idp_login.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/idp_session.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/sso/sso_config.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/utils.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/utils_athena.py +0 -0
- {kaqing-2.0.92/adam/sso → kaqing-2.0.94/adam/utils_k8s}/__init__.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/config_maps.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/custom_resources.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/ingresses.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/jobs.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/kube_context.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/secrets.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/service_accounts.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/services.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/statefulsets.py +0 -0
- {kaqing-2.0.92/adam/k8s_utils → kaqing-2.0.94/adam/utils_k8s}/volumes.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/adam/utils_net.py +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/kaqing.egg-info/dependency_links.txt +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/kaqing.egg-info/entry_points.txt +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/kaqing.egg-info/top_level.txt +0 -0
- {kaqing-2.0.92 → kaqing-2.0.94}/setup.cfg +0 -0
|
@@ -5,10 +5,10 @@ from typing import cast
|
|
|
5
5
|
import yaml
|
|
6
6
|
|
|
7
7
|
from adam.config import Config
|
|
8
|
-
from adam.
|
|
8
|
+
from adam.utils_k8s.ingresses import Ingresses
|
|
9
9
|
|
|
10
10
|
from . import __version__
|
|
11
|
-
from adam.
|
|
11
|
+
from adam.utils_k8s.services import Services
|
|
12
12
|
from adam.utils import copy_config_file
|
|
13
13
|
|
|
14
14
|
class AppAction:
|
|
@@ -25,7 +25,7 @@ from adam.commands.restart import Restart
|
|
|
25
25
|
from adam.commands.rollout import RollOut
|
|
26
26
|
from adam.commands.show.show import Show, ShowCommandHelper
|
|
27
27
|
from adam.commands.watch import Watch
|
|
28
|
-
from adam.
|
|
28
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
29
29
|
from adam.repl import enter_repl
|
|
30
30
|
from adam.repl_state import ReplState
|
|
31
31
|
from adam.cli_group import cli
|
|
@@ -13,10 +13,10 @@ from adam.checks.issue import Issue
|
|
|
13
13
|
from adam.checks.memory import Memory
|
|
14
14
|
from adam.checks.status import Status
|
|
15
15
|
from adam.config import Config
|
|
16
|
-
from adam.
|
|
17
|
-
from adam.
|
|
18
|
-
from adam.
|
|
19
|
-
from adam.
|
|
16
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
17
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
18
|
+
from adam.utils_k8s.secrets import Secrets
|
|
19
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
20
20
|
from adam.utils import elapsed_time, log2
|
|
21
21
|
|
|
22
22
|
def all_checks() -> list[Check]:
|
|
@@ -5,7 +5,7 @@ from adam.checks.check_context import CheckContext
|
|
|
5
5
|
from adam.checks.check_result import CheckResult
|
|
6
6
|
from adam.checks.issue import Issue
|
|
7
7
|
from adam.config import Config
|
|
8
|
-
from adam.
|
|
8
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
9
9
|
|
|
10
10
|
class CompactionStats(Check):
|
|
11
11
|
def name(self):
|
|
@@ -5,8 +5,8 @@ from adam.checks.check_context import CheckContext
|
|
|
5
5
|
from adam.checks.check_result import CheckResult
|
|
6
6
|
from adam.checks.issue import Issue
|
|
7
7
|
from adam.config import Config
|
|
8
|
-
from adam.
|
|
9
|
-
from adam.
|
|
8
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
9
|
+
from adam.utils_k8s.custom_resources import CustomResources
|
|
10
10
|
|
|
11
11
|
class Cpu(Check):
|
|
12
12
|
def name(self):
|
|
@@ -6,7 +6,7 @@ from adam.checks.check_context import CheckContext
|
|
|
6
6
|
from adam.checks.check_result import CheckResult
|
|
7
7
|
from adam.checks.issue import Issue
|
|
8
8
|
from adam.config import Config
|
|
9
|
-
from adam.
|
|
9
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
10
10
|
|
|
11
11
|
class Disk(Check):
|
|
12
12
|
def name(self):
|
|
@@ -4,7 +4,7 @@ from adam.checks.check import Check
|
|
|
4
4
|
from adam.checks.check_context import CheckContext
|
|
5
5
|
from adam.checks.check_result import CheckResult
|
|
6
6
|
from adam.checks.issue import Issue
|
|
7
|
-
from adam.
|
|
7
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
8
8
|
|
|
9
9
|
class Gossip(Check):
|
|
10
10
|
def name(self):
|
|
@@ -2,9 +2,9 @@ from adam.checks.check import Check
|
|
|
2
2
|
from adam.checks.check_context import CheckContext
|
|
3
3
|
from adam.checks.check_result import CheckResult
|
|
4
4
|
from adam.checks.issue import Issue
|
|
5
|
-
from adam.
|
|
6
|
-
from adam.
|
|
7
|
-
from adam.
|
|
5
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
6
|
+
from adam.utils_k8s.custom_resources import CustomResources
|
|
7
|
+
from adam.utils_k8s.pods import Pods
|
|
8
8
|
|
|
9
9
|
class Memory(Check):
|
|
10
10
|
def name(self):
|
|
@@ -4,7 +4,7 @@ from adam.checks.check import Check
|
|
|
4
4
|
from adam.checks.check_context import CheckContext
|
|
5
5
|
from adam.checks.check_result import CheckResult
|
|
6
6
|
from adam.checks.issue import Issue
|
|
7
|
-
from adam.
|
|
7
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
8
8
|
|
|
9
9
|
class Status(Check):
|
|
10
10
|
def name(self):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
|
-
from adam.
|
|
3
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
3
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
4
|
+
from adam.pod_exec_result import PodExecResult
|
|
4
5
|
from adam.repl_state import BashSession, ReplState, RequiredState
|
|
5
6
|
|
|
6
7
|
class Bash(Command):
|
|
@@ -51,7 +52,7 @@ class Bash(Command):
|
|
|
51
52
|
|
|
52
53
|
return state
|
|
53
54
|
|
|
54
|
-
def exec_with_dir(self, state: ReplState, args: list[str]):
|
|
55
|
+
def exec_with_dir(self, state: ReplState, args: list[str]) -> list[PodExecResult]:
|
|
55
56
|
session_just_created = False
|
|
56
57
|
if not args:
|
|
57
58
|
session_just_created = True
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
2
|
from adam.commands.postgres.postgres_utils import pg_database_names
|
|
3
3
|
from adam.commands.postgres.postgres_session import PostgresSession
|
|
4
|
-
from adam.
|
|
5
|
-
from adam.
|
|
6
|
-
from adam.
|
|
4
|
+
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
5
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
6
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
7
7
|
from adam.repl_state import ReplState
|
|
8
8
|
from adam.utils import log2
|
|
9
9
|
from adam.apps import Apps
|
|
@@ -3,9 +3,9 @@ import re
|
|
|
3
3
|
|
|
4
4
|
from adam.commands.reaper.reaper_session import ReaperSession
|
|
5
5
|
from adam.config import Config
|
|
6
|
-
from adam.
|
|
7
|
-
from adam.
|
|
8
|
-
from adam.
|
|
6
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
7
|
+
from adam.utils_k8s.secrets import Secrets
|
|
8
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
9
9
|
from adam.repl_state import ReplState
|
|
10
10
|
|
|
11
11
|
class CliCommands:
|
|
@@ -6,9 +6,9 @@ from typing import List
|
|
|
6
6
|
from adam.checks.check_utils import run_checks
|
|
7
7
|
from adam.columns.columns import Columns, collect_checks
|
|
8
8
|
from adam.commands.issues import Issues
|
|
9
|
-
from adam.
|
|
10
|
-
from adam.
|
|
11
|
-
from adam.
|
|
9
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
10
|
+
from adam.utils_k8s.pods import Pods
|
|
11
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
12
12
|
from adam.repl_state import ReplState
|
|
13
13
|
from adam.utils import convert_seconds, duration, lines_to_tabular, log, log2
|
|
14
14
|
|
|
@@ -2,9 +2,9 @@ import functools
|
|
|
2
2
|
import re
|
|
3
3
|
|
|
4
4
|
from adam.config import Config
|
|
5
|
-
from adam.
|
|
6
|
-
from adam.
|
|
7
|
-
from adam.
|
|
5
|
+
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
6
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
7
|
+
from adam.utils_k8s.secrets import Secrets
|
|
8
8
|
from adam.pod_exec_result import PodExecResult
|
|
9
9
|
from adam.repl_state import ReplState
|
|
10
10
|
from adam.utils import log2
|
|
@@ -5,8 +5,8 @@ import subprocess
|
|
|
5
5
|
|
|
6
6
|
from adam.apps import Apps
|
|
7
7
|
from adam.config import Config
|
|
8
|
-
from adam.
|
|
9
|
-
from adam.
|
|
8
|
+
from adam.utils_k8s.ingresses import Ingresses
|
|
9
|
+
from adam.utils_k8s.services import Services
|
|
10
10
|
from adam.utils import log2, random_alphanumeric
|
|
11
11
|
|
|
12
12
|
def start_user_code(namespace: str):
|
|
@@ -5,12 +5,12 @@ from adam.commands.command import Command
|
|
|
5
5
|
from adam.commands.deploy.deploy_utils import creating, deploy_frontend, gen_labels
|
|
6
6
|
from adam.commands.deploy.undeploy_pod import UndeployPod
|
|
7
7
|
from adam.config import Config
|
|
8
|
-
from adam.
|
|
9
|
-
from adam.
|
|
10
|
-
from adam.
|
|
11
|
-
from adam.
|
|
12
|
-
from adam.
|
|
13
|
-
from adam.
|
|
8
|
+
from adam.utils_k8s.config_maps import ConfigMaps
|
|
9
|
+
from adam.utils_k8s.deployment import Deployments
|
|
10
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
11
|
+
from adam.utils_k8s.pods import Pods
|
|
12
|
+
from adam.utils_k8s.service_accounts import ServiceAccounts
|
|
13
|
+
from adam.utils_k8s.volumes import ConfigMapMount
|
|
14
14
|
from adam.repl_state import ReplState, RequiredState
|
|
15
15
|
from adam.utils import log2
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Callable
|
|
2
2
|
from adam.app_session import AppSession
|
|
3
|
-
from adam.
|
|
4
|
-
from adam.
|
|
3
|
+
from adam.utils_k8s.ingresses import Ingresses
|
|
4
|
+
from adam.utils_k8s.services import Services
|
|
5
5
|
from adam.utils import log2
|
|
6
6
|
|
|
7
7
|
def deploy_frontend(name: str, namespace: str, label_selector: str):
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
2
|
from adam.commands.deploy.deploy_utils import undeploy_frontend, deleting
|
|
3
3
|
from adam.config import Config
|
|
4
|
-
from adam.
|
|
5
|
-
from adam.
|
|
6
|
-
from adam.
|
|
7
|
-
from adam.
|
|
4
|
+
from adam.utils_k8s.config_maps import ConfigMaps
|
|
5
|
+
from adam.utils_k8s.deployment import Deployments
|
|
6
|
+
from adam.utils_k8s.pods import Pods
|
|
7
|
+
from adam.utils_k8s.service_accounts import ServiceAccounts
|
|
8
8
|
from adam.repl_state import ReplState, RequiredState
|
|
9
9
|
|
|
10
10
|
class UndeployPod(Command):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
2
|
from adam.config import Config
|
|
3
|
-
from adam.
|
|
3
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
4
4
|
from adam.repl_state import ReplState, RequiredState
|
|
5
5
|
|
|
6
6
|
class Logs(Command):
|
|
@@ -6,10 +6,10 @@ from adam.commands.cql.cqlsh import Cqlsh
|
|
|
6
6
|
from adam.commands.postgres.postgres_utils import pg_database_names, pg_table_names
|
|
7
7
|
from adam.commands.postgres.postgres_session import PostgresSession
|
|
8
8
|
from adam.config import Config
|
|
9
|
-
from adam.
|
|
10
|
-
from adam.
|
|
11
|
-
from adam.
|
|
12
|
-
from adam.
|
|
9
|
+
from adam.utils_k8s.custom_resources import CustomResources
|
|
10
|
+
from adam.utils_k8s.ingresses import Ingresses
|
|
11
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
12
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
13
13
|
from adam.pod_exec_result import PodExecResult
|
|
14
14
|
from adam.repl_state import ReplState
|
|
15
15
|
from adam.utils import lines_to_tabular, log, log2
|
|
@@ -2,9 +2,9 @@ from datetime import datetime
|
|
|
2
2
|
import re
|
|
3
3
|
|
|
4
4
|
from adam.commands.command import Command
|
|
5
|
-
from adam.
|
|
5
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
6
6
|
from adam.repl_state import ReplState, RequiredState
|
|
7
|
-
from adam.
|
|
7
|
+
from adam.utils_k8s.custom_resources import CustomResources
|
|
8
8
|
from adam.utils import log2
|
|
9
9
|
|
|
10
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
|
|
3
3
|
from adam.commands.command import Command
|
|
4
|
-
from adam.
|
|
4
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
5
5
|
from adam.repl_state import ReplState, RequiredState
|
|
6
|
-
from adam.
|
|
6
|
+
from adam.utils_k8s.custom_resources import CustomResources
|
|
7
7
|
from adam.config import Config
|
|
8
8
|
from adam.utils import lines_to_tabular, log2
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
3
3
|
from adam.repl_state import ReplState, RequiredState
|
|
4
|
-
from adam.
|
|
4
|
+
from adam.utils_k8s.custom_resources import CustomResources
|
|
5
5
|
from adam.utils import lines_to_tabular, log2
|
|
6
6
|
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
3
3
|
from adam.repl_state import ReplState, RequiredState
|
|
4
|
-
from adam.
|
|
4
|
+
from adam.utils_k8s.custom_resources import CustomResources
|
|
5
5
|
from adam.utils import lines_to_tabular, log2
|
|
6
6
|
|
|
7
7
|
class MedusaShowRestoreJobs(Command):
|
|
@@ -4,12 +4,10 @@ from adam.commands.command import Command
|
|
|
4
4
|
from adam.commands.command_helpers import ClusterOrPodCommandHelper
|
|
5
5
|
from adam.commands.nodetool_commands import NODETOOL_COMMANDS
|
|
6
6
|
from adam.config import Config
|
|
7
|
-
from adam.
|
|
8
|
-
from adam.
|
|
9
|
-
from adam.pod_exec_result import PodExecResult
|
|
10
|
-
from adam.repl_session import ReplSession
|
|
7
|
+
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
8
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
11
9
|
from adam.repl_state import ReplState, RequiredState
|
|
12
|
-
from adam.utils import log
|
|
10
|
+
from adam.utils import log
|
|
13
11
|
|
|
14
12
|
class NodeTool(Command):
|
|
15
13
|
COMMAND = 'nodetool'
|
|
@@ -41,17 +39,11 @@ class NodeTool(Command):
|
|
|
41
39
|
command = f"nodetool -u {user} -pw {pw} {' '.join(args)}"
|
|
42
40
|
|
|
43
41
|
if state.pod:
|
|
44
|
-
|
|
45
|
-
if results and results.log_file and Config().get('repl.history.push-cat-remote-log-file', True):
|
|
46
|
-
ReplSession().prompt_session.history.append_string(f'bash cat {results.log_file}')
|
|
42
|
+
return CassandraNodes.exec(state.pod, state.namespace, command, show_out=True)
|
|
47
43
|
elif state.sts:
|
|
48
|
-
|
|
49
|
-
if results and Config().get('repl.history.push-cat-remote-log-file', True):
|
|
50
|
-
for result in results:
|
|
51
|
-
if result.log_file:
|
|
52
|
-
ReplSession().prompt_session.history.append_string(f'bash {result.pod} cat {result.log_file}')
|
|
44
|
+
return CassandraClusters.exec(state.sts, state.namespace, command, action='nodetool', show_out=True)
|
|
53
45
|
|
|
54
|
-
return
|
|
46
|
+
return state
|
|
55
47
|
|
|
56
48
|
def completion(self, state: ReplState):
|
|
57
49
|
if state.pod or state.sts:
|
|
@@ -3,9 +3,9 @@ import re
|
|
|
3
3
|
import subprocess
|
|
4
4
|
|
|
5
5
|
from adam.config import Config
|
|
6
|
-
from adam.
|
|
7
|
-
from adam.
|
|
8
|
-
from adam.
|
|
6
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
7
|
+
from adam.utils_k8s.pods import Pods
|
|
8
|
+
from adam.utils_k8s.secrets import Secrets
|
|
9
9
|
from adam.utils import log2
|
|
10
10
|
|
|
11
11
|
class PostgresSession:
|
|
@@ -7,7 +7,7 @@ import requests
|
|
|
7
7
|
from typing import List, cast
|
|
8
8
|
|
|
9
9
|
from adam.config import Config
|
|
10
|
-
from adam.
|
|
10
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
11
11
|
from adam.repl_state import ReplState
|
|
12
12
|
from adam.utils import lines_to_tabular, log2
|
|
13
13
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
|
-
from adam.
|
|
3
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.jobs import Jobs
|
|
3
|
+
from adam.utils_k8s.volumes import Volumes
|
|
4
4
|
from adam.repl_state import ReplState, RequiredState
|
|
5
5
|
from adam.config import Config
|
|
6
6
|
from adam.commands.reaper.reaper_session import ReaperSession
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
|
-
from adam.
|
|
3
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.pods import Pods
|
|
3
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
4
4
|
from adam.repl_state import ReplState, RequiredState
|
|
5
5
|
from adam.utils import log2
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@ from kubernetes.client.rest import ApiException
|
|
|
4
4
|
|
|
5
5
|
from adam.commands.command import Command
|
|
6
6
|
from adam.commands.watch import Watch
|
|
7
|
-
from adam.
|
|
7
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
8
8
|
from adam.config import Config
|
|
9
9
|
from adam.repl_state import ReplState, RequiredState
|
|
10
10
|
from adam.utils import duration, log2
|
|
@@ -8,9 +8,9 @@ from adam.columns.columns import Columns
|
|
|
8
8
|
from adam.commands.command import Command
|
|
9
9
|
from adam.commands.issues import Issues
|
|
10
10
|
from adam.config import Config
|
|
11
|
-
from adam.
|
|
12
|
-
from adam.
|
|
13
|
-
from adam.
|
|
11
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
12
|
+
from adam.utils_k8s.secrets import Secrets
|
|
13
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
14
14
|
from adam.repl_state import ReplState, RequiredState
|
|
15
15
|
from adam.utils import lines_to_tabular, log, log2
|
|
16
16
|
from adam.checks.status import parse_nodetool_status
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
|
-
from adam.
|
|
3
|
-
from adam.
|
|
4
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
3
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
4
|
+
from adam.utils_k8s.secrets import Secrets
|
|
5
5
|
from adam.repl_state import ReplState, RequiredState
|
|
6
6
|
|
|
7
7
|
class ShowCassandraVersion(Command):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
2
|
from adam.commands.commands_utils import show_table
|
|
3
3
|
from adam.config import Config
|
|
4
|
-
from adam.
|
|
4
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
5
5
|
from adam.repl_state import ReplState, RequiredState
|
|
6
6
|
|
|
7
7
|
class ShowProcesses(Command):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
|
-
from adam.
|
|
3
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
3
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
4
4
|
from adam.repl_state import ReplState, RequiredState
|
|
5
5
|
|
|
6
6
|
class ShowRepairs(Command):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from adam.commands.command import Command
|
|
2
2
|
from adam.commands.commands_utils import show_table
|
|
3
3
|
from adam.config import Config
|
|
4
|
-
from adam.
|
|
4
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
5
5
|
from adam.repl_state import ReplState, RequiredState
|
|
6
6
|
|
|
7
7
|
class ShowStorage(Command):
|
|
@@ -6,7 +6,7 @@ from typing import List
|
|
|
6
6
|
from adam.commands.command import Command
|
|
7
7
|
from adam.commands.commands_utils import show_pods, show_rollout
|
|
8
8
|
from adam.config import Config
|
|
9
|
-
from adam.
|
|
9
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
10
10
|
from adam.repl_state import ReplState, RequiredState
|
|
11
11
|
from adam.utils import convert_seconds, log2
|
|
12
12
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import os
|
|
1
2
|
from typing import TypeVar, cast
|
|
2
3
|
import yaml
|
|
3
4
|
|
|
@@ -38,7 +39,7 @@ class Config:
|
|
|
38
39
|
return get_deep_keys(self.params)
|
|
39
40
|
|
|
40
41
|
def is_debug(self):
|
|
41
|
-
return Config().get('debug', False)
|
|
42
|
+
return os.getenv('QING_DEV').lower() == 'true' or Config().get('debug', False)
|
|
42
43
|
|
|
43
44
|
def debug(self, s: None):
|
|
44
45
|
if self.is_debug():
|
|
@@ -15,8 +15,8 @@ from adam.commands.command_helpers import ClusterCommandHelper
|
|
|
15
15
|
from adam.commands.help import Help
|
|
16
16
|
from adam.commands.postgres.postgres_session import PostgresSession
|
|
17
17
|
from adam.config import Config
|
|
18
|
-
from adam.
|
|
19
|
-
from adam.
|
|
18
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
19
|
+
from adam.utils_k8s.statefulsets import StatefulSets
|
|
20
20
|
from adam.log import Log
|
|
21
21
|
from adam.repl_commands import ReplCommands
|
|
22
22
|
from adam.repl_session import ReplSession
|
|
@@ -3,10 +3,10 @@ from enum import Enum
|
|
|
3
3
|
import re
|
|
4
4
|
|
|
5
5
|
from adam.commands.postgres.postgres_session import PostgresSession
|
|
6
|
-
from adam.
|
|
7
|
-
from adam.
|
|
8
|
-
from adam.
|
|
9
|
-
from adam.
|
|
6
|
+
from adam.utils_k8s.cassandra_clusters import CassandraClusters
|
|
7
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
8
|
+
from adam.utils_k8s.kube_context import KubeContext
|
|
9
|
+
from adam.utils_k8s.secrets import Secrets
|
|
10
10
|
from adam.utils import display_help, log2, random_alphanumeric
|
|
11
11
|
|
|
12
12
|
class BashSession:
|
|
@@ -2,7 +2,7 @@ from concurrent.futures import ThreadPoolExecutor
|
|
|
2
2
|
import sys
|
|
3
3
|
from typing import TypeVar
|
|
4
4
|
|
|
5
|
-
from adam.
|
|
5
|
+
from adam.utils_k8s.cassandra_nodes import CassandraNodes
|
|
6
6
|
from adam.pod_exec_result import PodExecResult
|
|
7
7
|
from adam.utils import log2
|
|
8
8
|
from .statefulsets import StatefulSets
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
from adam.config import Config
|
|
2
|
-
from adam.
|
|
3
|
-
from adam.
|
|
2
|
+
from adam.utils_k8s.pods import Pods
|
|
3
|
+
from adam.utils_k8s.secrets import Secrets
|
|
4
4
|
from adam.pod_exec_result import PodExecResult
|
|
5
|
+
from adam.repl_session import ReplSession
|
|
5
6
|
|
|
6
7
|
# utility collection on cassandra nodes; methods are all static
|
|
7
8
|
class CassandraNodes:
|
|
8
9
|
def exec(pod_name: str, namespace: str, command: str, show_out = True, throw_err = False, shell = '/bin/sh') -> PodExecResult:
|
|
9
|
-
|
|
10
|
+
r = Pods.exec(pod_name, "cassandra", namespace, command, show_out = show_out, throw_err = throw_err, shell = shell)
|
|
11
|
+
|
|
12
|
+
if r and Config().get('repl.history.push-cat-remote-log-file', True):
|
|
13
|
+
if r.log_file:
|
|
14
|
+
ReplSession().prompt_session.history.append_string(f'bash {r.pod} cat {r.log_file}')
|
|
15
|
+
|
|
16
|
+
return r
|
|
10
17
|
|
|
11
18
|
def get_host_id(pod_name: str, ns: str):
|
|
12
19
|
try:
|