Ensure metrics port exists for nodelocaldns/nodelocaldns-second daemonsets (#11998)

- update metrics port to use port variable
- unconditionally define ports
This commit is contained in:
Ricky Kwan
2025-03-27 07:14:34 -04:00
committed by GitHub
parent aa0c0851f8
commit 4a5b524b98
2 changed files with 6 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ spec:
- coredns
{% if enable_nodelocaldns_secondary %}
- -skipteardown
{% else %}
{% endif %}
ports:
- containerPort: 53
name: dns
@@ -55,10 +55,9 @@ spec:
- containerPort: 53
name: dns-tcp
protocol: TCP
- containerPort: 9253
- containerPort: {{ nodelocaldns_prometheus_port }}
name: metrics
protocol: TCP
{% endif %}
securityContext:
privileged: true
{% if nodelocaldns_bind_metrics_host_ip %}