feat: route paths to non-web processes via proxy:route

Adds proxy:route:set/remove/clear/report so users can declare path-prefix routes to non-web Procfile processes without hand-writing nginx.conf.sigil. Routes are stored on the proxy plugin as a PropertyMap of path to process:port:strip, with set semantics so each invocation produces a fully-determined state and re-application is idempotent. A proxy-supports-routes capability trigger gates the command per backend - nginx-vhosts, traefik-vhosts, caddy-vhosts, and scheduler-k3s render routes today; openresty-vhosts and haproxy-vhosts refuse until their sidecar images learn a path-prefix vocabulary (tracked in dokku/openresty-docker-proxy#137 and the haproxy sidecar). Closes #8725.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-11-04 14:56:38 -05:00
1 parent 2cd558e102
commit ffd5248cc3
29 files changed
+1539 -7

No files matched your search

+25
View File
@@ -70,6 +70,31 @@ type GlobalNetwork struct {
// PrimaryServicePort is the primary service port to use
PrimaryServicePort int32 `yaml:"primary_service_port"`
// Routes are the path-based routes declared via proxy:route:set
Routes []GlobalRoute `yaml:"routes,omitempty"`
}
// GlobalRoute is one path-based route declared via proxy:route:set. The
// chart templates iterate this slice to emit additional Ingress paths /
// IngressRoute Rules per route.
type GlobalRoute struct {
// Process is the Procfile process type the route targets.
Process string `yaml:"process"`
// Path is the URL path prefix to match.
Path string `yaml:"path"`
// Port is the upstream container port the route forwards to.
Port int32 `yaml:"port"`
// StripPrefix controls whether the matched prefix is stripped before
// forwarding the request upstream.
StripPrefix bool `yaml:"strip_prefix"`
// Slug is a deterministic kebab-case identifier derived from Path. It is
// used as a stable name fragment for generated CRDs.
Slug string `yaml:"slug"`
}
// GlobalKedaValues contains the global keda configuration