Skip to content

feat: local dev against k8s prod MySQL via port-forward - #3

Draft
daimoniac wants to merge 11 commits into
masterfrom
cursor/dev-prod-k8s-404b
Draft

feat: local dev against k8s prod MySQL via port-forward#3
daimoniac wants to merge 11 commits into
masterfrom
cursor/dev-prod-k8s-404b

Conversation

@daimoniac

Copy link
Copy Markdown
Owner

Summary

Adds scripts/dev-prod.sh to run the legacy Bottle GUI locally while connected to the production MySQL database in Kubernetes.

  • Discovers the MySQL service name via kubectl (defaults: context internal1, namespace asprom)
  • Port-forwards the service to 127.0.0.1:3307
  • Attempts to read DB credentials from common Kubernetes secrets/deployments
  • Generates a temporary config and starts aspromGUI.py on port 8080
  • Adds ASPROM_CFG support in Cfg for alternate config paths

Usage

pip install -r requirements.txt
./scripts/dev-prod.sh

Override service discovery if needed:

MYSQL_SERVICE=mysql KUBE_CONTEXT=internal1 KUBE_NAMESPACE=asprom ./scripts/dev-prod.sh

Warning

This connects to production data. Scans and baseline changes affect live systems.

Test plan

  • ./scripts/check.sh passes (41 tests, 72% coverage)
Open in Web Open in Cursor 

cursoragent and others added 11 commits June 29, 2026 13:30
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
- Discover MySQL service via kubectl (internal1/asprom by default)
- Port-forward to localhost and run aspromGUI with generated config
- Support ASPROM_CFG override in Cfg for non-default config paths

Co-authored-by: Stefan Knott <daimoniac@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants