|
3 | 3 | // This product includes software developed at Datadog (https://www.datadoghq.com/). |
4 | 4 | // Copyright 2026-present Datadog, Inc. |
5 | 5 |
|
6 | | -//! Identity bootstrap. Before its first OPMS call, par-control runs the Go |
7 | | -//! ensure-enrollment one-shot. Go owns hostname resolution, enrollment, and |
8 | | -//! persistence; Rust then loads ordinary operational configuration and the |
9 | | -//! persisted or configured identity directly. |
| 6 | +//! Identity bootstrap. Before its first OPMS call, par-control runs the |
| 7 | +//! Go PAR's ensure-enrollment command. Go owns hostname resolution, enrollment, |
| 8 | +//! and persistence. Rust then loads operational config and the identity. |
10 | 9 |
|
11 | 10 | use crate::config::Config; |
12 | 11 | use anyhow::{Context, Result, bail}; |
13 | 12 | use log::info; |
14 | 13 | use std::path::Path; |
15 | 14 | use std::process::Command; |
16 | 15 |
|
17 | | -/// Run the Go ensure-enrollment one-shot, then load the control-plane config |
18 | | -/// directly from local YAML, environment, and Fleet policy. |
19 | | -/// |
20 | | -/// `ensure_enrollment_command` is the complete argv configured by the installed |
21 | | -/// process definition, normally `privateactionrunner ensure-enrollment --cfgpath |
22 | | -/// <datadog.yaml>`. It runs on every split-mode startup so the hostname decision |
23 | | -/// exactly matches the Go Agent. The command itself applies persisted identity, |
24 | | -/// inline identity, and `self_enroll` precedence. |
| 16 | +/// Run ensure-enrollment, then load the control-plane config |
| 17 | +/// from local YAML, environment, and Fleet policy. |
25 | 18 | pub fn load_config_with_bootstrap( |
26 | 19 | config_path: &Path, |
27 | 20 | ensure_enrollment_command: &[String], |
|
0 commit comments