Skip to content

Commit e55387e

Browse files
committed
move env name into const
1 parent 58db8d0 commit e55387e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/stackable-operator/src/product_logging/framework.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const SHUTDOWN_FILE: &str = "shutdown";
3333
pub const VECTOR_CONFIG_FILE: &str = "vector.yaml";
3434
/// Key in the discovery ConfigMap that holds the vector aggregator address
3535
const VECTOR_AGGREGATOR_CM_KEY: &str = "ADDRESS";
36+
/// Name of the env var in the vector container that holds the vector aggregator address
37+
const VECTOR_AGGREGATOR_ENV_NAME: &str = "VECTOR_AGGREGATOR_ADDRESS";
3638

3739
#[derive(Debug, Snafu)]
3840
pub enum LoggingError {
@@ -1329,7 +1331,7 @@ sinks:
13291331
inputs:
13301332
- extended_logs
13311333
type: vector
1332-
address: $VECTOR_AGGREGATOR_ADDRESS
1334+
address: ${VECTOR_AGGREGATOR_ENV_NAME}
13331335
"#,
13341336
namespace = role_group.cluster.namespace.clone().unwrap_or_default(),
13351337
cluster_name = role_group.cluster.name,
@@ -1476,7 +1478,7 @@ kill $vector_pid
14761478
)])
14771479
.add_env_var("VECTOR_LOG", log_level.to_vector_literal())
14781480
.add_env_var_from_config_map(
1479-
"VECTOR_AGGREGATOR_ADDRESS",
1481+
VECTOR_AGGREGATOR_ENV_NAME,
14801482
vector_aggregator_config_map_name,
14811483
VECTOR_AGGREGATOR_CM_KEY,
14821484
)

0 commit comments

Comments
 (0)