Skip to content

Commit 3f8d840

Browse files
committed
rename headless service
1 parent 074d138 commit 3f8d840

13 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/modules/nifi/pages/usage_guide/monitoring.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ spec:
127127
- __meta_kubernetes_pod_container_port_number
128128
targetLabel: __address__
129129
replacement: ${1}.${2}.${3}.svc.cluster.local:${4}
130-
regex: (.+);(.+?)(?:-metrics)?;(.+);(.+)
130+
regex: (.+);(.+?)(?:-headless)?;(.+);(.+)
131131
selector:
132132
matchLabels:
133133
prometheus.io/scrape: "true"
@@ -138,4 +138,4 @@ spec:
138138
<1> Authorization via Bearer Token stored in a secret
139139
<2> Relabel \\__address__ to be a FQDN rather then the IP-Address of target pod
140140

141-
NOTE: As of xref:listener-operator:listener.adoc[Listener] integration, SDP exposes a Service with `-metrics` thus we need to regex this suffix.
141+
NOTE: As of xref:listener-operator:listener.adoc[Listener] integration, SDP exposes a Service with `-headless` thus we need to regex this suffix.

rust/operator-binary/src/controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1483,7 +1483,7 @@ async fn build_node_rolegroup_statefulset(
14831483
}
14841484

14851485
pub fn rolegroup_service_name(rolegroup: &RoleGroupRef<v1alpha1::NifiCluster>) -> String {
1486-
format!("{name}-metrics", name = rolegroup.object_name())
1486+
format!("{name}-headless", name = rolegroup.object_name())
14871487
}
14881488

14891489
async fn get_proxy_hosts(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//! Due to changes in the JWT validation in 1.25.0, the issuer refers to the FQDN of the Pod that was created, e.g.:
99
//! {
1010
//! "sub": "admin",
11-
//! "iss": "test-nifi-node-default-0.test-nifi-node-default-metrics.default.svc.cluster.local:8443",
11+
//! "iss": "test-nifi-node-default-0.test-nifi-node-default-headless.default.svc.cluster.local:8443",
1212
//! }
1313
//! which was different in e.g. 1.23.2
1414
//! {

tests/templates/kuttl/iceberg/61-provision-nifi-flow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ data:
5454
import urllib3
5555
5656
# As of 2022-08-29 we cant use "https://nifi:8443" here because <h2>The request contained an invalid host header [<code>nifi:8443</code>] in the request [<code>/nifi-api</code>]. Check for request manipulation or third-party intercept.</h2>
57-
ENDPOINT = f"https://nifi-node-default-0.nifi-node-default-metrics.{os.environ['NAMESPACE']}.svc.cluster.local:8443" # For local testing / developing replace it, afterwards change back to f"https://nifi-node-default-0.nifi-node-default-metrics.{os.environ['NAMESPACE']}.svc.cluster.local:8443"
57+
ENDPOINT = f"https://nifi-node-default-0.nifi-node-default-headless.{os.environ['NAMESPACE']}.svc.cluster.local:8443" # For local testing / developing replace it, afterwards change back to f"https://nifi-node-default-0.nifi-node-default-headless.{os.environ['NAMESPACE']}.svc.cluster.local:8443"
5858
USERNAME = "admin"
5959
PASSWORD = open("/nifi-users/admin").read()
6060

tests/templates/kuttl/ldap/test_nifi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_token(nifi_host, username, password):
4646
# disable warnings as we have specified non-verified https connections
4747
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
4848

49-
host = f"https://test-nifi-node-default-1.test-nifi-node-default-metrics.{args['namespace']}.svc.cluster.local:8443"
49+
host = f"https://test-nifi-node-default-1.test-nifi-node-default-headless.{args['namespace']}.svc.cluster.local:8443"
5050
token = get_token(host, args["user"], args["password"])
5151
headers = {"Authorization": token}
5252
node_count = int(args["count"])

tests/templates/kuttl/oidc-opa/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
namespace = os.environ["NAMESPACE"]
1818
tls = os.environ["OIDC_USE_TLS"]
1919
nifi_version = os.environ["NIFI_VERSION"]
20-
nifi = f"test-nifi-node-default-0.test-nifi-node-default-metrics.{namespace}.svc.cluster.local"
20+
nifi = f"test-nifi-node-default-0.test-nifi-node-default-headless.{namespace}.svc.cluster.local"
2121
keycloak_service = f"keycloak.{namespace}.svc.cluster.local"
2222

2323
keycloak_base_url = (

tests/templates/kuttl/smoke_v1/test_nifi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_token(nifi_host, username, password):
4646
# disable warnings as we have specified non-verified https connections
4747
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
4848

49-
host = f"https://nifi-node-default-1.nifi-node-default-metrics.{args['namespace']}.svc.cluster.local:8443"
49+
host = f"https://nifi-node-default-1.nifi-node-default-headless.{args['namespace']}.svc.cluster.local:8443"
5050
token = get_token(host, args["user"], args["password"])
5151
headers = {"Authorization": token}
5252
node_count = int(args["count"])

tests/templates/kuttl/smoke_v1/test_nifi_metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
port = args["port"]
4040
timeout = int(args["timeout"])
4141

42-
url = f"http://nifi-node-default-0.nifi-node-default-metrics.{namespace}.svc.cluster.local:{port}/metrics"
42+
url = f"http://nifi-node-default-0.nifi-node-default-headless.{namespace}.svc.cluster.local:{port}/metrics"
4343

4444
# wait for 'timeout' seconds
4545
t_end = time.time() + timeout

tests/templates/kuttl/smoke_v2/test_nifi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_token(nifi_host, username, password):
4646
# disable warnings as we have specified non-verified https connections
4747
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
4848

49-
host = f"https://nifi-node-default-1.nifi-node-default-metrics.{args['namespace']}.svc.cluster.local:8443"
49+
host = f"https://nifi-node-default-1.nifi-node-default-headless.{args['namespace']}.svc.cluster.local:8443"
5050
token = get_token(host, args["user"], args["password"])
5151
headers = {"Authorization": token}
5252
node_count = int(args["count"])

tests/templates/kuttl/upgrade/04-assert.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ commands:
88
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- python /tmp/test_nifi_metrics.py -n $NAMESPACE
99
{% endif %}
1010
{% if test_scenario['values']['nifi_old'].split(',')[0] == '2.0.0' %}
11-
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- sh -c "python /tmp/flow.py -e https://test-nifi-node-default-0.test-nifi-node-default-metrics.$NAMESPACE.svc.cluster.local:8443 run json /tmp/generate-and-log-flowfiles.json > /tmp/old_input"
11+
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- sh -c "python /tmp/flow.py -e https://test-nifi-node-default-0.test-nifi-node-default-headless.$NAMESPACE.svc.cluster.local:8443 run json /tmp/generate-and-log-flowfiles.json > /tmp/old_input"
1212
{% else %}
13-
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- sh -c "python /tmp/flow.py -e https://test-nifi-node-default-0.test-nifi-node-default-metrics.$NAMESPACE.svc.cluster.local:8443 run template /tmp/generate-and-log-flowfiles.xml > /tmp/old_input"
13+
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- sh -c "python /tmp/flow.py -e https://test-nifi-node-default-0.test-nifi-node-default-headless.$NAMESPACE.svc.cluster.local:8443 run template /tmp/generate-and-log-flowfiles.xml > /tmp/old_input"
1414
{% endif %}
1515
# This tests if the output contains an Error or zero flow files are queued, which also indicates that something went wrong
1616
- script: kubectl exec -n $NAMESPACE test-nifi-0 -- sh -c "cat /tmp/old_input | grep -Eov 'Error|\b0\b'"

0 commit comments

Comments
 (0)