Skip to content

Commit 48c41f4

Browse files
committed
chore: Add comments explaining why we explicitly listen on interfaces
1 parent da4d64d commit 48c41f4

File tree

1 file changed

+6
-0
lines changed
  • rust/operator-binary/src/config

1 file changed

+6
-0
lines changed

rust/operator-binary/src/config/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,11 @@ pub fn build_nifi_properties(
484484
"nifi.web.https.network.interface.default".to_string(),
485485
"".to_string(),
486486
);
487+
// Specifically listen on eth0 and lo interfaces.
488+
// Listening on lo allows k8s port-forward to work.
489+
// Once we listen on lo, we need to explicitly listen on eth0 so the server can be exposed (including health probes).
490+
// NOTE: We assume "eth0" is always the external interface in containers launched in Kubernetes.
491+
// It is possible that some container runtime will name it differently, but we haven't yet observed that.
487492
properties.insert(
488493
"nifi.web.https.network.interface.eth0".to_string(),
489494
"eth0".to_string(),
@@ -492,6 +497,7 @@ pub fn build_nifi_properties(
492497
"nifi.web.https.network.interface.lo".to_string(),
493498
"lo".to_string(),
494499
);
500+
//#############################################
495501
properties.insert(
496502
"nifi.web.jetty.working.directory".to_string(),
497503
"./work/jetty".to_string(),

0 commit comments

Comments
 (0)