18 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
5faabea3d4 feat: port vhost proxy :report subcommands to golang
The bash :report implementations for the caddy, haproxy, openresty, and traefik proxy plugins are replaced with a compiled golang binary that collects report keys in parallel and marshals json directly. The traefik dns-provider values keep their masking behaviour, remaining hidden in the default stdout report while surfacing for --format json or an explicit flag query. These four plugins previously had no unit tests, so a bats suite covering the report matrix is added for each.
2026-07-07 06:29:01 -04:00
Jose Diaz-Gonzalez
76b033234f fix: split report global keys into raw and computed across plugins
The `<plugin>-global-<property>` keys in `:report` output returned the resolved value with the built-in default substituted in, so external tooling could not distinguish a property that had been set globally to the default from one that had never been set. The bare keys for caddy, haproxy, and traefik global-only properties had the same shape. The `global-<property>` keys now hold the raw stored value and are empty when nothing has been set, and a new `computed-<property>` key holds the effective value used at runtime, falling back through the per-app value (where one exists), the global value, and the built-in default. The bare global-only keys for the three proxy plugins are removed in favor of the raw/computed pair. Closes #8631.
2026-05-23 00:05:33 -04:00
Jose Diaz-Gonzalez
7b515ea129 refactor: drop unused value_exists from report functions
The `value_exists` variable in the report info-flag loop is no longer read after the `not deployed` failure was removed, and was already unused in domains, haproxy-vhosts, traefik-vhosts, caddy-vhosts, and openresty-vhosts. Drop the declaration and the trailing assignment so the loop reads cleanly across all plugins.
2026-05-10 22:23:46 -04:00
Jose Diaz-Gonzalez
964c0fc4e9 fix: source property-functions where fn-plugin-property-* helpers are used
The release_and_deploy function and several proxy plugin scripts call fn-plugin-property-* helpers without sourcing `plugins/common/property-functions`, producing `command not found` errors during deploys. Source the helpers from `plugins/common/functions` and from each proxy plugin entry point that consumes them.
2026-05-04 06:11:22 -04:00
Jose Diaz-Gonzalez
e8d8b0683a fix: preserve info flag in plugin reports with --global
The argument-handling block in each plugin's report command overwrote APP with --global before checking whether $1 actually held an info flag, so `dokku <plugin>:report --global --<plugin>-foo` always emitted the full report instead of the requested value. Reorder the conditionals across the sixteen plugins that share the pattern so the info-flag check runs first, and add a regression bats case for each one.
2026-04-30 21:05:46 -04:00
Jose Diaz-Gonzalez
53ef8c7780 fix: deflake haproxy bats tests
The byjg/easy-haproxy image polls Docker for label changes every 10
seconds by default, which races with the haproxy bats suite and
intermittently produces curl exit 7. Expose `refresh-conf` as a
global-only haproxy property that maps to `EASYHAPROXY_REFRESH_CONF`,
lower it to 2 seconds in the bats setup, and wrap the localhost HTTP
assertions in a retry loop so checks wait for haproxy to converge
rather than failing on the first attempt.
2026-04-30 18:40:57 -04:00
Jose Diaz-Gonzalez
8282981361 feat: accept --global on :report subcommands
Every `:report` subcommand now recognizes `--global` as a scope selector that limits the report to globally-configured properties, including in JSON form via `--global --format json`. Previously this combination was rejected because `--global` was treated as an info flag, conflicting with `--format`. The shared `common.ParseReportArgs` helper now returns a `ReportArgs` struct exposing the parsed scope; each Go and bash report selects a global-only flag map when scope is global, and skips per-app verification.
2026-04-29 10:30:59 -04:00
Jose Diaz-Gonzalez
d212fd44c7 refactor: rename functions to be plural
They are plural for the scheduler-k3s plugin.
2025-11-16 18:12:28 -05:00
Jose Diaz-Gonzalez
12cc31427b refactor: split out label subcommands into distinct commands 2025-11-16 16:30:56 -05:00
dragonhunt02
4eafd3b5b7 feat: implement proxy container :label functionality 2025-11-16 02:38:36 -05:00
Jose Diaz-Gonzalez
6ce10b5be6 fix: ensure compose projects are spawned from the /tmp directory
A recent update to compose executes a stat call in the current working directory, which may have incorrect permissions for execution once the user is changed to the dokku user. This change forces all compose commands to execute in the /tmp directory by using a helper function to execute compose up/down.

Closes #7705
2025-05-24 23:31:41 -04:00
Jose Diaz-Gonzalez
7f7a044a07 docs: clean up references in proxy plugins 2023-08-05 11:07:55 -04:00
Jose Diaz-Gonzalez
aee691a5fb fix: use correct namespace for haproxy service state tracking 2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
986c05ff7e fix: keep track of the stopped/started state of haproxy 2023-05-28 15:46:32 -04:00
Jose Diaz-Gonzalez
cbd3c43176 feat: add letsencrypt support to haproxy plugin 2023-02-11 06:22:02 -05:00
Jose Diaz-Gonzalez
40cb28287f fix: gate compose usage behind compose check 2023-02-11 06:09:50 -05:00
Jose Diaz-Gonzalez
fd09beaf48 feat: add the ability to set the haproxy log level 2023-02-11 06:08:56 -05:00
Jose Diaz-Gonzalez
237aae9eec feat: first pass at haproxy plugin implementation 2023-02-11 06:08:56 -05:00