Skip to content

Commit 61af41b

Browse files
authored
fix: Listen on loopback interface so that k8s port-forward works (#870)
* fix: Listen on loopback interface so that k8s port-forward works NOTE: This required explicitly listening on eth0, otherwise only the loopback interface would be listening. * chore: Update changelog * docs(getting_started): Remove ZooKeeper from example output * fix: Use unnumbered loopback * chore: Add comments explaining why we explicitly listen on interfaces
1 parent 78f8c59 commit 61af41b

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Fixed
8+
9+
- Also listen on the loopback interface so that k8s port-forwards work ([#870]).
10+
11+
[#870]: https://github.com/stackabletech/nifi-operator/pull/870
12+
713
## [25.11.0] - 2025-11-07
814

915
## [25.11.0-rc1] - 2025-11-06

docs/modules/nifi/pages/getting_started/first_steps.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ The output should show all pods ready:
4646
----
4747
NAME READY AGE
4848
simple-nifi-node-default 2/2 5m
49-
simple-zk-server-default 3/3 7m
5049
----
5150

5251
Congratulations! You successfully created your first NiFi cluster!

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,20 @@ 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.
492+
properties.insert(
493+
"nifi.web.https.network.interface.eth0".to_string(),
494+
"eth0".to_string(),
495+
);
496+
properties.insert(
497+
"nifi.web.https.network.interface.lo".to_string(),
498+
"lo".to_string(),
499+
);
500+
//#############################################
487501
properties.insert(
488502
"nifi.web.jetty.working.directory".to_string(),
489503
"./work/jetty".to_string(),

0 commit comments

Comments
 (0)