Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Canonicalize Docker Podman agent CLI copy

rcourtman5091affb1b47
diff --git a/cmd/pulse-agent/main.go b/cmd/pulse-agent/main.go
index 1d5dcb8b1f..a7861bf1dc 100644
--- a/cmd/pulse-agent/main.go
+++ b/cmd/pulse-agent/main.go
@@ -599,7 +599,7 @@ type Config struct {
// Auto-update
DisableAutoUpdate bool
DisableDockerUpdateChecks bool // Disable Docker image update detection
- DockerRuntime string // Force container runtime: docker, podman, or auto
+ DockerRuntime string // Force Docker / Podman runtime: docker, podman, or auto
// Security
EnableCommands bool // Enable command execution for Patrol remediation (disabled by default)
@@ -719,13 +719,13 @@ func loadConfig(args []string, getenv func(string) string) (Config, error) {
logLevelFlag := fs.String("log-level", defaultLogLevel(envLogLevel), "Log level")
enableHostFlag := fs.Bool("enable-host", defaultEnableHost, "Enable Host Agent module")
- enableDockerFlag := fs.Bool("enable-docker", defaultEnableDocker, "Enable Docker Agent module")
+ enableDockerFlag := fs.Bool("enable-docker", defaultEnableDocker, "Enable Docker / Podman Agent module")
enableKubernetesFlag := fs.Bool("enable-kubernetes", defaultEnableKubernetes, "Enable Kubernetes Agent module")
enableProxmoxFlag := fs.Bool("enable-proxmox", defaultEnableProxmox, "Enable Proxmox mode (creates API token, registers node)")
proxmoxTypeFlag := fs.String("proxmox-type", envProxmoxType, "Proxmox type: pve or pbs (auto-detected if not specified)")
disableAutoUpdateFlag := fs.Bool("disable-auto-update", utils.ParseBool(envDisableAutoUpdate), "Disable automatic updates")
disableDockerUpdateChecksFlag := fs.Bool("disable-docker-update-checks", utils.ParseBool(envDisableDockerUpdateChecks), "Disable Docker image update detection (avoids Docker Hub rate limits)")
- dockerRuntimeFlag := fs.String("docker-runtime", envDockerRuntime, "Container runtime: auto, docker, or podman (default: auto)")
+ dockerRuntimeFlag := fs.String("docker-runtime", envDockerRuntime, "Docker / Podman runtime: auto, docker, or podman (default: auto)")
enableCommandsFlag := fs.Bool("enable-commands", utils.ParseBool(envEnableCommands), "Enable command execution for Patrol remediation (disabled by default)")
disableCommandsFlag := fs.Bool("disable-commands", false, "[DEPRECATED] Commands are now disabled by default; use --enable-commands to enable")
enrollFlag := fs.Bool("enroll", false, "Exchange bootstrap token for runtime token (used by deploy wizard)")
diff --git a/cmd/pulse-agent/main_test.go b/cmd/pulse-agent/main_test.go
index b8a905700d..b9463bc948 100644
--- a/cmd/pulse-agent/main_test.go
+++ b/cmd/pulse-agent/main_test.go
@@ -36,6 +36,33 @@ func TestEnableCommandsHelpUsesPatrolRemediationCopy(t *testing.T) {
}
}
+func TestDockerRuntimeHelpUsesDockerPodmanCopy(t *testing.T) {
+ source, err := os.ReadFile("main.go")
+ if err != nil {
+ t.Fatalf("read pulse-agent main.go: %v", err)
+ }
+ text := string(source)
+
+ for _, want := range []string{
+ "Enable Docker / Podman Agent module",
+ "Docker / Podman runtime: auto, docker, or podman (default: auto)",
+ "Force Docker / Podman runtime: docker, podman, or auto",
+ } {
+ if !strings.Contains(text, want) {
+ t.Fatalf("expected pulse-agent CLI copy %q", want)
+ }
+ }
+ for _, stale := range []string{
+ "Enable Docker Agent module",
+ "Container runtime: auto, docker, or podman (default: auto)",
+ "Force container runtime: docker, podman, or auto",
+ } {
+ if strings.Contains(text, stale) {
+ t.Fatalf("pulse-agent CLI copy must not expose stale generic runtime label %q", stale)
+ }
+ }
+}
+
func TestGatherTags(t *testing.T) {
tests := []struct {
name string
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
index 5231229d95..57cc89c939 100644
--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md
@@ -280,6 +280,12 @@ profile and assignment columns, but embedded table framing must route through
The CLI entrypoint owns propagation of persistence context into runtime-owned helpers. When installer-selected state roots differ from the default, `cmd/pulse-agent/main.go` must pass that exact `StateDir` through both the host-agent runtime and updater startup paths instead of letting one path silently fall back to `/var/lib/pulse-agent`.
The same runtime-owned boundary also owns Pulse control-plane URL validation for agent startup, remote config, updater continuity, and command transport. Non-loopback control-plane URLs remain HTTPS/WSS by default, but explicitly insecure agent/dev-runtime flows may use plain HTTP/WS for LAN development control planes; installer-persisted dev URLs must not be accepted by one runtime path and rejected by another.
The unified agent CLI copy follows the same Patrol remediation vocabulary as the install surface. `cmd/pulse-agent/main.go` may keep the `--enable-commands` flag name for compatibility, but the help text and inline comments must describe command execution as Patrol remediation rather than reviving AI auto-fix language.
+ The unified agent CLI copy also owns operator-facing Docker / Podman runtime
+ labels. `cmd/pulse-agent/main.go` may keep the historical
+ `--enable-docker` and `--docker-runtime` flag names for compatibility, but
+ help text and inline comments must describe the module and runtime as
+ Docker / Podman rather than exposing the generic container-runtime family
+ label.
8. Add or change installer flags, persisted service arguments, or upgrade-safe re-entry behavior through `scripts/install.sh` and `scripts/install.ps1`.
Persistence-sensitive NAS targets must keep one canonical continuity model here: installer-owned bootstraps may use flash-backed or immutable-root launch hooks only as thin trampolines, while the durable wrapper, state, and reboot-surviving binary copy stay in the governed persistent state directory that updater continuity also refreshes.
Approval-gated command execution must expose stable rejection reasons for