airlock/config.rs
1use std::path::PathBuf;
2
3use crate::driver::ContainerOs;
4
5/// Millstone configuration.
6#[derive(Clone)]
7pub struct MillstoneConfig {
8 /// Container image to use.
9 ///
10 /// This must be a valid image reference -- `millstone:x.y.z`, `registry.ddbuild.io/saluki/millstone:x.y.z`, etc --
11 /// to an image containing the `millstone` binary.
12 pub image: String,
13
14 /// Path to the millstone binary.
15 ///
16 /// Defaults to `/usr/local/bin/millstone`.
17 pub binary_path: Option<String>,
18
19 /// Path to the millstone configuration file to use.
20 ///
21 /// This file is mapped into the millstone container and so it must exist on the system where this command is run
22 /// from.
23 pub config_path: PathBuf,
24}
25
26/// datadog-intake configuration.
27#[derive(Clone)]
28pub struct DatadogIntakeConfig {
29 /// Container image to use.
30 ///
31 /// This must be a valid image reference -- `datadog-intake:x.y.z`,
32 /// `registry.ddbuild.io/saluki/datadog-intake:x.y.z`, etc -- to an image containing the `datadog-intake` binary.
33 pub image: String,
34
35 /// Path to the datadog-intake binary.
36 ///
37 /// Defaults to `/usr/local/bin/datadog-intake`.
38 pub binary_path: Option<String>,
39}
40
41/// Target configuration.
42#[derive(Clone)]
43pub struct TargetConfig {
44 /// Container image to use.
45 ///
46 /// This must be a valid image reference -- `agent-data-plane:x.y.z`,
47 /// `registry.ddbuild.io/saluki/agent-data-plane:x.y.z`, etc -- to an image containing the `agent-data-plane`
48 /// binary.
49 pub image: String,
50
51 /// Entrypoint to execute.
52 pub entrypoint: Vec<String>,
53
54 /// Command to run.
55 pub command: Vec<String>,
56
57 /// Additional environment variables to be passed into the target container.
58 ///
59 /// These should be in the form of `KEY=VALUE`.
60 pub additional_env_vars: Vec<String>,
61
62 /// Operating system defaults to use when creating the target container.
63 pub container_os: ContainerOs,
64}