Browse Source
Ensure metrics port exists for nodelocaldns/nodelocaldns-second daemonsets (#11998)
- update metrics port to use port variable
- unconditionally define ports
pull/12085/head
Ricky Kwan
1 week ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
3 deletions
-
roles/kubernetes-apps/ansible/templates/nodelocaldns-daemonset.yml.j2
-
roles/kubernetes-apps/ansible/templates/nodelocaldns-second-daemonset.yml.j2
|
|
@ -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 %} |
|
|
|
|
|
@ -39,6 +39,10 @@ spec: |
|
|
|
cpu: {{ nodelocaldns_cpu_requests }} |
|
|
|
memory: {{ nodelocaldns_memory_requests }} |
|
|
|
args: [ "-localip", "{{ nodelocaldns_ip }}", "-conf", "/etc/coredns/Corefile", "-upstreamsvc", "coredns", "-skipteardown" ] |
|
|
|
ports: |
|
|
|
- containerPort: {{ nodelocaldns_secondary_prometheus_port }} |
|
|
|
name: metrics |
|
|
|
protocol: TCP |
|
|
|
securityContext: |
|
|
|
privileged: true |
|
|
|
{% if nodelocaldns_bind_metrics_host_ip %} |
|
|
|