kaqing 1.98.81__tar.gz → 1.98.83__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-1.98.81 → kaqing-1.98.83}/PKG-INFO +1 -1
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/setup_frontend.py +2 -2
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/teardown_frontend.py +2 -2
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/medusa/medusa_show_backupjobs.py +1 -1
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/medusa/medusa_show_restorejobs.py +1 -1
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/embedded_params.py +1 -1
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/repl_commands.py +6 -2
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/authn_ad.py +1 -55
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/authn_okta.py +1 -30
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/idp.py +10 -9
- kaqing-1.98.83/adam/version.py +5 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/kaqing.egg-info/PKG-INFO +1 -1
- {kaqing-1.98.81 → kaqing-1.98.83}/setup.py +1 -1
- kaqing-1.98.81/adam/version.py +0 -5
- {kaqing-1.98.81 → kaqing-1.98.83}/README +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/app_session.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/apps.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/batch.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/check.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/check_context.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/check_result.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/check_utils.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/compactionstats.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/cpu.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/disk.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/gossip.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/issue.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/memory.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/checks/status.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/cli.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/cli_group.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/column.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/columns.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/compactions.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/cpu.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/dir_data.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/dir_snapshots.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/gossip.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/host_id.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/memory.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/node_address.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/node_load.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/node_owns.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/node_status.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/node_tokens.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/node_utils.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/pod_name.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/volume_cassandra.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/columns/volume_root.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/app.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/app_ping.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/bash.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/cd.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/check.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/cli_commands.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/command.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/command_helpers.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/commands_utils.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/cp.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/cql_utils.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/cqlsh.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/devices.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/exit.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/code_start.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/code_stop.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/code_utils.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/setup.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/frontend/teardown.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/help.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/issues.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/login.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/logs.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/ls.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/medusa/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/medusa/medusa.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/medusa/medusa_backup.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/medusa/medusa_restore.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/nodetool.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/nodetool_commands.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/param_get.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/param_set.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/postgres/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/postgres/postgres.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/postgres/postgres_ls.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/postgres/postgres_preview.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/postgres/postgres_session.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/preview_table.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/pwd.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_forward.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_forward_stop.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_restart.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_run_abort.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_runs.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_runs_abort.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_schedule_activate.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_schedule_start.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_schedule_stop.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_schedules.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_session.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/reaper/reaper_status.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/repair/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/repair/repair.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/repair/repair_log.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/repair/repair_run.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/repair/repair_scan.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/repair/repair_stop.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/report.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/restart.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/rollout.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_adam.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_app_actions.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_app_id.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_app_queues.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_cassandra_status.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_cassandra_version.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_commands.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_login.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_params.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_processes.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_repairs.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/show/show_storage.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/user_entry.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/commands/watch.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/config.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/embedded_apps.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/cassandra_clusters.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/cassandra_nodes.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/custom_resources.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/ingresses.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/jobs.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/kube_context.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/pods.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/secrets.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/services.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/statefulsets.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/k8s_utils/volumes.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/log.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/pod_exec_result.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/repl.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/repl_session.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/repl_state.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/__init__.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/authenticator.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/cred_cache.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/id_token.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/idp_login.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/idp_session.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/sso/sso_config.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/adam/utils.py +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/kaqing.egg-info/SOURCES.txt +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/kaqing.egg-info/dependency_links.txt +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/kaqing.egg-info/entry_points.txt +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/kaqing.egg-info/top_level.txt +0 -0
- {kaqing-1.98.81 → kaqing-1.98.83}/setup.cfg +0 -0
|
@@ -51,8 +51,8 @@ class SetupFrontend(Command):
|
|
|
51
51
|
|
|
52
52
|
return state
|
|
53
53
|
|
|
54
|
-
def completion(self,
|
|
55
|
-
return
|
|
54
|
+
def completion(self, state: ReplState):
|
|
55
|
+
return super().completion(state)
|
|
56
56
|
|
|
57
57
|
def help(self, _: ReplState):
|
|
58
58
|
return f'{SetupFrontend.COMMAND}\t sets up frontend'
|
|
@@ -35,8 +35,8 @@ class TearDownFrontend(Command):
|
|
|
35
35
|
|
|
36
36
|
return state
|
|
37
37
|
|
|
38
|
-
def completion(self,
|
|
39
|
-
return
|
|
38
|
+
def completion(self, state: ReplState):
|
|
39
|
+
return super().completion(state)
|
|
40
40
|
|
|
41
41
|
def help(self, _: ReplState):
|
|
42
42
|
return f'{TearDownFrontend.COMMAND}\t tear down frontend'
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
def config():
|
|
2
|
-
return {'app': {'console-endpoint': 'https://{host}/{env}/{app}/static/console/index.html', 'cr': {'cluster-regex': '(.*?-.*?)-.*', 'group': 'ops.c3.ai', 'v': 'v2', 'plural': 'c3cassandras'}, 'label': 'c3__app_id-0', 'login': {'admin-group': '{host}/C3.ClusterAdmin', 'ingress': '{app_id}-k8singr-appleader-001', 'timeout': 5, 'session-check-url': 'https://{host}/{env}/{app}/api/8/C3/userSessionToken', 'cache-creds': True, 'cache-username': True, 'url': 'https://{host}/{env}/{app}', 'another': "You're logged in to {has}. However, for this app, you need to log in to {need}.", 'token-server-url': 'http://localhost:{port}', 'password-max-length': 128}, 'strip': '0'}, 'bash': {'workers': 32}, 'cassandra': {'service-name': 'all-pods-service'}, 'cql': {'workers': 32, 'samples': 3, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-superuser', 'password-item': 'password'}}, 'checks': {'compactions-threshold': 250, 'cpu-busy-threshold': 98.0, 'cpu-threshold': 0.0, 'cassandra-data-path': '/c3/cassandra', 'root-disk-threshold': 50, 'cassandra-disk-threshold': 50, 'snapshot-size-cmd': "ls /c3/cassandra/data/data/*/*/snapshots | grep snapshots | sed 's/:$//g' | xargs -I {} du -sk {} | awk '{print $1}' | awk '{s+=$1} END {print s}'", 'snapshot-size-threshold': '40G', 'table-sizes-cmd': "ls -Al /c3/cassandra/data/data/ | awk '{print $9}' | sed 's/\\^r//g' | xargs -I {} du -sk /c3/cassandra/data/data/{}"}, 'get-host-id': {'workers': 32}, 'idps': {'ad': {'email-pattern': '.*@c3.ai', 'uri': 'https://login.microsoftonline.com/53ad779a-93e7-485c-ba20-ac8290d7252b/oauth2/v2.0/authorize?response_type=id_token&response_mode=form_post&client_id=00ff94a8-6b0a-4715-98e0-95490012d818&scope=openid+email+profile&redirect_uri=https%3A%2F%2Fplat.c3ci.cloud%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://login.microsoftonline.com/common/discovery/keys', 'contact': 'Please contact ted.tran@c3.ai.', 'whitelist-file': '/kaqing/members'}, 'okta': {'default': True, 'email-pattern': '.*@c3iot.com', 'uri': 'https://c3energy.okta.com/oauth2/v1/authorize?response_type=id_token&response_mode=form_post&client_id={client_id}&scope=openid+email+profile+groups&redirect_uri=https%3A%2F%2F{host}%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY'}}, 'issues': {'workers': 32}, 'logs': {'path': '/c3/cassandra/logs/system.log'}, 'medusa': {'restore-auto-complete': False}, 'nodetool': {'workers': 32, 'samples': 3, 'commands_in_line': 40}, 'pg': {'name-pattern': '^{namespace}.*-k8spg-.*', 'excludes': '.helm., -admin-secret', 'agent': {'image': 'seanahnsf/kaqing', 'name': 'kaqing-agent', 'timeout': 86400}, 'default-db': 'postgres', 'default-schema': 'postgres', 'secret': {'endpoint-key': 'postgres-db-endpoint', 'port-key': 'postgres-db-port', 'username-key': 'postgres-admin-username', 'password-key': 'postgres-admin-password'}}, 'preview': {'rows': 10}, 'processes': {'columns': 'pod,cpu,mem', 'header': 'POD_NAME,CPU,MEM/LIMIT'}, 'reaper': {'service-name': 'reaper-service', 'port-forward': {'timeout': 86400, 'local-port': 9001}, 'abort-runs-batch': 10, 'show-runs-batch': 100, 'pod': {'cluster-regex': '(.*?-.*?-.*?-.*?)-.*', 'label-selector': 'k8ssandra.io/reaper={cluster}-reaper'}, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-reaper-ui', 'password-item': 'password'}}, 'repair': {'log-path': '/home/cassrepair/logs/', 'image': 'ci-registry.c3iot.io/cloudops/cassrepair:2.0.13', 'secret': 'ciregistryc3iotio', 'env': {'interval': 24, 'timeout': 60, 'pr': False, 'runs': 1}}, 'repl': {'start-drive': 'a', 'auto-enter-app': 'c3/c3', 'auto-enter-only-cluster': True}, 'status': {'columns': 'status,address,load,tokens,owns,host_id,gossip,compactions', 'header': '--,Address,Load,Tokens,Owns,Host ID,GOSSIP,COMPACTIONS'}, 'storage': {'columns': 'pod,volume_root,volume_cassandra,snapshots,data,compactions', 'header': 'POD_NAME,VOLUME /,VOLUME CASS,SNAPSHOTS,DATA,COMPACTIONS'}, 'watch': {'auto': 'rollout', 'timeout': 3600, 'interval': 10}, 'debug': {'timings': False, 'exit-on-error': False, 'show-parallelism': False, 'show-out': False}}
|
|
2
|
+
return {'app': {'console-endpoint': 'https://{host}/{env}/{app}/static/console/index.html', 'cr': {'cluster-regex': '(.*?-.*?)-.*', 'group': 'ops.c3.ai', 'v': 'v2', 'plural': 'c3cassandras'}, 'label': 'c3__app_id-0', 'login': {'admin-group': '{host}/C3.ClusterAdmin', 'ingress': '{app_id}-k8singr-appleader-001', 'timeout': 5, 'session-check-url': 'https://{host}/{env}/{app}/api/8/C3/userSessionToken', 'cache-creds': True, 'cache-username': True, 'url': 'https://{host}/{env}/{app}', 'another': "You're logged in to {has}. However, for this app, you need to log in to {need}.", 'token-server-url': 'http://localhost:{port}', 'password-max-length': 128}, 'strip': '0'}, 'bash': {'workers': 32}, 'cassandra': {'service-name': 'all-pods-service'}, 'cql': {'workers': 32, 'samples': 3, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-superuser', 'password-item': 'password'}}, 'checks': {'compactions-threshold': 250, 'cpu-busy-threshold': 98.0, 'cpu-threshold': 0.0, 'cassandra-data-path': '/c3/cassandra', 'root-disk-threshold': 50, 'cassandra-disk-threshold': 50, 'snapshot-size-cmd': "ls /c3/cassandra/data/data/*/*/snapshots | grep snapshots | sed 's/:$//g' | xargs -I {} du -sk {} | awk '{print $1}' | awk '{s+=$1} END {print s}'", 'snapshot-size-threshold': '40G', 'table-sizes-cmd': "ls -Al /c3/cassandra/data/data/ | awk '{print $9}' | sed 's/\\^r//g' | xargs -I {} du -sk /c3/cassandra/data/data/{}"}, 'get-host-id': {'workers': 32}, 'idps': {'ad': {'email-pattern': '.*@c3.ai', 'uri': 'https://login.microsoftonline.com/53ad779a-93e7-485c-ba20-ac8290d7252b/oauth2/v2.0/authorize?response_type=id_token&response_mode=form_post&client_id=00ff94a8-6b0a-4715-98e0-95490012d818&scope=openid+email+profile&redirect_uri=https%3A%2F%2Fplat.c3ci.cloud%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://login.microsoftonline.com/common/discovery/keys', 'contact': 'Please contact ted.tran@c3.ai.', 'whitelist-file': '/kaqing/members'}, 'okta': {'default': True, 'email-pattern': '.*@c3iot.com', 'uri': 'https://c3energy.okta.com/oauth2/v1/authorize?response_type=id_token&response_mode=form_post&client_id={client_id}&scope=openid+email+profile+groups&redirect_uri=https%3A%2F%2F{host}%2Fc3%2Fc3%2Foidc%2Flogin&nonce={nonce}&state=EMPTY', 'jwks-uri': 'https://c3energy.okta.com/oauth2/v1/keys'}}, 'issues': {'workers': 32}, 'logs': {'path': '/c3/cassandra/logs/system.log'}, 'medusa': {'restore-auto-complete': False}, 'nodetool': {'workers': 32, 'samples': 3, 'commands_in_line': 40}, 'pg': {'name-pattern': '^{namespace}.*-k8spg-.*', 'excludes': '.helm., -admin-secret', 'agent': {'image': 'seanahnsf/kaqing', 'name': 'kaqing-agent', 'timeout': 86400}, 'default-db': 'postgres', 'default-schema': 'postgres', 'secret': {'endpoint-key': 'postgres-db-endpoint', 'port-key': 'postgres-db-port', 'username-key': 'postgres-admin-username', 'password-key': 'postgres-admin-password'}}, 'preview': {'rows': 10}, 'processes': {'columns': 'pod,cpu,mem', 'header': 'POD_NAME,CPU,MEM/LIMIT'}, 'reaper': {'service-name': 'reaper-service', 'port-forward': {'timeout': 86400, 'local-port': 9001}, 'abort-runs-batch': 10, 'show-runs-batch': 100, 'pod': {'cluster-regex': '(.*?-.*?-.*?-.*?)-.*', 'label-selector': 'k8ssandra.io/reaper={cluster}-reaper'}, 'secret': {'cluster-regex': '(.*?-.*?)-.*', 'name': '{cluster}-reaper-ui', 'password-item': 'password'}}, 'repair': {'log-path': '/home/cassrepair/logs/', 'image': 'ci-registry.c3iot.io/cloudops/cassrepair:2.0.13', 'secret': 'ciregistryc3iotio', 'env': {'interval': 24, 'timeout': 60, 'pr': False, 'runs': 1}}, 'repl': {'start-drive': 'a', 'auto-enter-app': 'c3/c3', 'auto-enter-only-cluster': True}, 'status': {'columns': 'status,address,load,tokens,owns,host_id,gossip,compactions', 'header': '--,Address,Load,Tokens,Owns,Host ID,GOSSIP,COMPACTIONS'}, 'storage': {'columns': 'pod,volume_root,volume_cassandra,snapshots,data,compactions', 'header': 'POD_NAME,VOLUME /,VOLUME CASS,SNAPSHOTS,DATA,COMPACTIONS'}, 'watch': {'auto': 'rollout', 'timeout': 3600, 'interval': 10}, 'debug': {'timings': False, 'exit-on-error': False, 'show-parallelism': False, 'show-out': False}}
|
|
@@ -2,6 +2,10 @@ from adam.commands.app import App
|
|
|
2
2
|
from adam.commands.app_ping import AppPing
|
|
3
3
|
from adam.commands.frontend.code_start import CodeStart
|
|
4
4
|
from adam.commands.frontend.code_stop import CodeStop
|
|
5
|
+
from adam.commands.frontend.setup import Setup
|
|
6
|
+
from adam.commands.frontend.setup_frontend import SetupFrontend
|
|
7
|
+
from adam.commands.frontend.teardown import TearDown
|
|
8
|
+
from adam.commands.frontend.teardown_frontend import TearDownFrontend
|
|
5
9
|
from adam.commands.show.show_app_queues import ShowAppQueues
|
|
6
10
|
from adam.commands.cp import ClipboardCopy
|
|
7
11
|
from adam.commands.bash import Bash
|
|
@@ -44,7 +48,7 @@ class ReplCommands:
|
|
|
44
48
|
cmds: list[Command] = ReplCommands.navigation() + ReplCommands.cassandra_check() + ReplCommands.cassandra_ops() + \
|
|
45
49
|
ReplCommands.tools() + ReplCommands.app() + ReplCommands.exit()
|
|
46
50
|
|
|
47
|
-
intermediate_cmds: list[Command] = [
|
|
51
|
+
intermediate_cmds: list[Command] = [App(), Reaper(), Repair(), Setup(), Show(), TearDown()]
|
|
48
52
|
ic = [c.command() for c in intermediate_cmds]
|
|
49
53
|
# 1. dedup commands
|
|
50
54
|
deduped = []
|
|
@@ -71,7 +75,7 @@ class ReplCommands:
|
|
|
71
75
|
return Medusa.cmd_list() + [Restart(), RollOut(), Watch()] + Reaper.cmd_list() + Repair.cmd_list()
|
|
72
76
|
|
|
73
77
|
def tools() -> list[Command]:
|
|
74
|
-
return [Cqlsh(), Postgres(), Bash(), CodeStart(), CodeStop()]
|
|
78
|
+
return [Cqlsh(), Postgres(), Bash(), CodeStart(), CodeStop(), SetupFrontend(), TearDownFrontend()]
|
|
75
79
|
|
|
76
80
|
def app() -> list[Command]:
|
|
77
81
|
return [ShowAppActions(), ShowAppId(), ShowAppQueues(), AppPing(), App()]
|
|
@@ -163,58 +163,4 @@ class AdAuthenticator(Authenticator):
|
|
|
163
163
|
except:
|
|
164
164
|
Config().debug(traceback.format_exc())
|
|
165
165
|
|
|
166
|
-
return None
|
|
167
|
-
|
|
168
|
-
# def decode_jwt_part(encoded_part):
|
|
169
|
-
# missing_padding = len(encoded_part) % 4
|
|
170
|
-
# if missing_padding:
|
|
171
|
-
# encoded_part += '=' * (4 - missing_padding)
|
|
172
|
-
# decoded_bytes = base64.urlsafe_b64decode(encoded_part)
|
|
173
|
-
# return json.loads(decoded_bytes.decode('utf-8'))
|
|
174
|
-
|
|
175
|
-
# parts = id_token.split('.')
|
|
176
|
-
# # header = decode_jwt_part(parts[0])
|
|
177
|
-
# data = decode_jwt_part(parts[1])
|
|
178
|
-
# print('SEAN', payload)
|
|
179
|
-
# {
|
|
180
|
-
# 'aud': '00ff94a8-6b0a-4715-98e0-95490012d818',
|
|
181
|
-
# 'iss': 'https://login.microsoftonline.com/53ad779a-93e7-485c-ba20-ac8290d7252b/v2.0',
|
|
182
|
-
# 'iat': 1756138348,
|
|
183
|
-
# 'nbf': 1756138348,
|
|
184
|
-
# 'exp': 1756142248,
|
|
185
|
-
# 'cc': 'CmCuOndNgXFbP/Vor0kv9fqd32LOv7kSHKStVrGPTXXnlPlSET3g4z23XjVZJW37F2Yy8d45MzZ6xA/XNbYGE3BHYAZFhfDKOp0ZbWZysqa2zqD3lpyXxnlEpzWkFY1SlDgSBWMzLmFpGhIKEFbS9ukejKFBi0QKCcPHh6MiEgoQb7gHorgqqEOuuPDIcSgHATICTkE4AUIJCQDvjjtx391I',
|
|
186
|
-
# 'email': 'sean.ahn@c3.ai',
|
|
187
|
-
# 'groups': [
|
|
188
|
-
# 'e58ef97f-8622-47cc-93cd-0ec8e3df2b4e',
|
|
189
|
-
# '290214ec-2eaa-47bb-802c-70c2535bb7e7',
|
|
190
|
-
# '55cd2e92-c40d-4646-b837-c6fb6406013b',
|
|
191
|
-
# '9b715aa3-ec6c-44ad-be0c-a1d95045526d',
|
|
192
|
-
# '19a38c19-e4c3-4d7b-8bb0-4afe7f502a51',
|
|
193
|
-
# '5d891ce3-02d8-4d34-9748-9e711a3d54c5',
|
|
194
|
-
# '0626cb36-106c-4ab3-adcf-7ee8e3f05584',
|
|
195
|
-
# '6dfdfa3e-b225-4a74-a534-1cc963f78e08',
|
|
196
|
-
# 'bfdcca4e-7212-4e73-9b8a-eecfd3a7797d',
|
|
197
|
-
# '6d050845-61c4-4072-acb1-9662d0c9faa0',
|
|
198
|
-
# 'c4fbb32c-9892-4eb3-a829-b4eaaf71b4ef'
|
|
199
|
-
# ],
|
|
200
|
-
# 'name': 'Sean Ahn',
|
|
201
|
-
# 'nonce': 'V7DzmHtmhu3X3tzZmC55vMQ2WJtqXnW6wJpYb3Kfud8',
|
|
202
|
-
# 'oid': '380029a1-0643-4764-b3b8-9bc02630af41',
|
|
203
|
-
# 'preferred_username': 'sean.ahn@c3.ai',
|
|
204
|
-
# 'rh': '1.ATcAmnetU-eTXEi6IKyCkNclK6iU_wAKaxVHmOCVSQAS2Bj1AJU3AA.',
|
|
205
|
-
# 'sid': '007dea79-a65c-7911-5142-8ea1b9faa41a',
|
|
206
|
-
# 'sub': 'd-iCznXBDo3HEV7UCGalCVFIG47dQl_SFCaQtN2yVQI',
|
|
207
|
-
# 'tid': '53ad779a-93e7-485c-ba20-ac8290d7252b',
|
|
208
|
-
# 'uti': 'b7gHorgqqEOuuPDIcSgHAQ',
|
|
209
|
-
# 'ver': '2.0'
|
|
210
|
-
# }
|
|
211
|
-
|
|
212
|
-
# return IdToken(
|
|
213
|
-
# data,
|
|
214
|
-
# data['email'],
|
|
215
|
-
# data['name'],
|
|
216
|
-
# groups=data['groups'] if 'groups' in data else [],
|
|
217
|
-
# iat=data['iat'] if 'iat' in data else 0,
|
|
218
|
-
# nbf=data['nbf'] if 'nbf' in data else 0,
|
|
219
|
-
# exp=data['exp'] if 'exp' in data else 0
|
|
220
|
-
# )
|
|
166
|
+
return None
|
|
@@ -79,34 +79,6 @@ class OktaAuthenticator(Authenticator):
|
|
|
79
79
|
log2(f'{username} is not a member of {group}.')
|
|
80
80
|
|
|
81
81
|
raise OktaException("You are not part of admin group.")
|
|
82
|
-
# print(parsed)
|
|
83
|
-
# {
|
|
84
|
-
# 'sub': '00u1fii2azgmh46dE1d8',
|
|
85
|
-
# 'name': 'Sean Ahn',
|
|
86
|
-
# 'locale': 'US',
|
|
87
|
-
# 'email': 'sean.ahn@c3iot.com',
|
|
88
|
-
# 'ver': 1,
|
|
89
|
-
# 'iss': 'https://c3energy.okta.com',
|
|
90
|
-
# 'aud': 'azops88.c3.ai',
|
|
91
|
-
# 'iat': 1756136559,
|
|
92
|
-
# 'exp': 1756140159,
|
|
93
|
-
# 'jti': 'ID.fIjNa_A-uYo-mKMqpN_CLPqgQUnDIHeBV4WGa-Q_Qx8',
|
|
94
|
-
# 'amr': [
|
|
95
|
-
# 'pwd'
|
|
96
|
-
# ],
|
|
97
|
-
# 'idp': '00onsxj5mmBGYLRURHTH',
|
|
98
|
-
# 'nonce': 'kRpFTGiyUGg6uWfdCUkS3tGI4wrroCz3MTaeI_wTILE',
|
|
99
|
-
# 'preferred_username': 'sean.ahn@c3iot.com',
|
|
100
|
-
# 'given_name': 'Seung',
|
|
101
|
-
# 'family_name': 'Ahn',
|
|
102
|
-
# 'zoneinfo': 'America/Los_Angeles',
|
|
103
|
-
# 'updated_at': 1755201182,
|
|
104
|
-
# 'email_verified': False,
|
|
105
|
-
# 'auth_time': 1756136558,
|
|
106
|
-
# 'groups': [
|
|
107
|
-
# 'azops88.c3.ai/C3.ClusterAdmin'
|
|
108
|
-
# ]
|
|
109
|
-
# }
|
|
110
82
|
|
|
111
83
|
return IdpLogin(redirect_url, id_token, state_token, username, idp_uri=idp_uri, id_token_obj=parsed, session=session)
|
|
112
84
|
|
|
@@ -118,8 +90,7 @@ class OktaAuthenticator(Authenticator):
|
|
|
118
90
|
|
|
119
91
|
return None
|
|
120
92
|
|
|
121
|
-
|
|
122
|
-
jwks_url = f"{okta_auth_server}/v1/keys"
|
|
93
|
+
jwks_url = Config().get('idps.okta.jwks-uri', 'https://c3energy.okta.com/oauth2/v1/keys')
|
|
123
94
|
try:
|
|
124
95
|
jwks_client = jwt.PyJWKClient(jwks_url, cache_jwk_set=True, lifespan=360)
|
|
125
96
|
signing_key = jwks_client.get_signing_key_from_jwt(id_token)
|
|
@@ -34,15 +34,16 @@ class Idp:
|
|
|
34
34
|
if use_token_from_env:
|
|
35
35
|
if l0 := session.login_from_env_var():
|
|
36
36
|
return l0
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
|
|
38
|
+
if port := os.getenv("SERVER_PORT"):
|
|
39
|
+
token_server = Config().get('app.login.token-server-url', 'http://localhost:{port}').replace('{port}', port)
|
|
40
|
+
res: requests.Response = requests.get(token_server)
|
|
41
|
+
if res.status_code == 200 and res.text:
|
|
42
|
+
try:
|
|
43
|
+
# may fail if the idp token is not complete
|
|
44
|
+
return session.login_from_token(res.text)
|
|
45
|
+
except:
|
|
46
|
+
pass
|
|
46
47
|
|
|
47
48
|
r: IdpLogin = None
|
|
48
49
|
try:
|
kaqing-1.98.81/adam/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|