mirror of
https://github.com/lukaszraczylo/kportal.git
synced 2026-10-12 04:35:10 +00:00
* Allow configuring forwards-table columns, order, and width Adds an optional tui.columns section to .kportal.yaml so the visible columns, their order, and their widths can be customized instead of always rendering the hardcoded 8-column layout. Omitting the section keeps the existing default columns/order/widths. Closes #81 * fix(ui): keep the plain table layout and check column widths The plain verbose table must look the same when no tui section is set. It had narrower columns and shorter port headers than before. The default layout is now identical to the old one, and a golden test guards it. A status column that is not last now pads by visible width. Table rules follow the column widths. The UI applies new columns only after a reload succeeds, including the SIGHUP path of the verbose table. The validator rejects a column width above 200. The README describes the tui.columns setting. Refs #81 * fix(httplog): replace the deprecated ReverseProxy Director with Rewrite Staticcheck reports SA1019 because Go 1.26 deprecates Director. The proxy now sets the target in a Rewrite function. Rewrite drops the X-Forwarded-For header that Director sent, so the function calls SetXForwarded to keep that header. A new test checks the target port, the path and the header. * fix(release): drop the deprecated cask url verified key Homebrew warns about the verified parameter of the cask url stanza. The setting is not needed. GoReleaser check now passes without a deprecation warning. The postflight warning remains. GoReleaser generates it from the post install hook, and the upstream fix is not released yet. Refs #79 --------- Co-authored-by: Lukasz Raczylo <[email protected]>
87 lines
3.3 KiB
YAML
87 lines
3.3 KiB
YAML
# Example kportal configuration
|
|
# Copy this file to your project and customize as needed
|
|
|
|
# Optional: Health check configuration
|
|
# These settings control how kportal monitors connection health and detects stale connections
|
|
healthCheck:
|
|
interval: "3s" # How often to check connection health (default: 3s)
|
|
timeout: "2s" # Timeout for health check operations (default: 2s)
|
|
method: "data-transfer" # Health check method: "tcp-dial" or "data-transfer" (default: data-transfer)
|
|
# - tcp-dial: Simple TCP connection test (fast, less reliable)
|
|
# - data-transfer: Attempts to read data (slower, more reliable)
|
|
maxConnectionAge: "25m" # Maximum connection age before proactive reconnect (default: 25m)
|
|
# Helps avoid Kubernetes API server timeouts (typically 30m)
|
|
maxIdleTime: "10m" # Maximum idle time before marking as stale (default: 10m)
|
|
# Connections with no data transfer are marked stale
|
|
|
|
# Optional: Reliability configuration
|
|
# These settings improve connection stability for long-running transfers
|
|
reliability:
|
|
tcpKeepalive: "30s" # TCP keepalive interval for OS-level connection monitoring (default: 30s)
|
|
dialTimeout: "30s" # Connection dial timeout (default: 30s)
|
|
retryOnStale: true # Automatically reconnect when stale connections detected (default: true)
|
|
watchdogPeriod: "30s" # Goroutine watchdog check interval to detect hung workers (default: 30s)
|
|
|
|
# Optional: TUI table configuration
|
|
# Controls which columns are visible in the forwards table, in what order,
|
|
# and how wide each one renders. Omit this section (or leave it empty) to
|
|
# use the built-in default columns/order/widths.
|
|
# Valid column names: context, namespace, alias, type, resource, remote, local, status
|
|
# tui:
|
|
# columns:
|
|
# - name: alias
|
|
# width: 30 # optional; falls back to the built-in default width
|
|
# - name: resource
|
|
# - name: local
|
|
# - name: status
|
|
|
|
contexts:
|
|
# Production context
|
|
- name: production
|
|
namespaces:
|
|
- name: default
|
|
forwards:
|
|
# Forward to API service
|
|
- resource: service/api
|
|
protocol: tcp
|
|
port: 8080
|
|
localPort: 8080
|
|
alias: prod-api
|
|
httpLog: true # Enable HTTP traffic logging for this forward (press 'l' in the TUI)
|
|
|
|
# Forward to PostgreSQL database
|
|
- resource: service/postgres
|
|
protocol: tcp
|
|
port: 5432
|
|
localPort: 5432
|
|
alias: prod-db
|
|
|
|
- name: monitoring
|
|
forwards:
|
|
# Forward to Prometheus using label selector
|
|
- resource: pod
|
|
selector: app=prometheus
|
|
protocol: tcp
|
|
port: 9090
|
|
localPort: 9090
|
|
alias: prometheus
|
|
|
|
# Staging context
|
|
- name: staging
|
|
namespaces:
|
|
- name: default
|
|
forwards:
|
|
# Forward to staging app (prefix matching handles pod restarts)
|
|
- resource: pod/myapp
|
|
protocol: tcp
|
|
port: 8080
|
|
localPort: 8081
|
|
alias: staging-http
|
|
|
|
# Forward multiple ports from same pod
|
|
- resource: pod/myapp
|
|
protocol: tcp
|
|
port: 9090
|
|
localPort: 9091
|
|
alias: staging-metrics
|