From 77de7cb785953e11784954986ef544648b3007ad Mon Sep 17 00:00:00 2001
From: Viktor Jacynycz <49399859+vjacynycz@users.noreply.github.com>
Date: Tue, 14 Jun 2022 16:17:33 +0200
Subject: [PATCH] Expose calico-typha metrics port (#8855)

---
 .../calico/templates/calico-typha.yml.j2              | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/roles/network_plugin/calico/templates/calico-typha.yml.j2 b/roles/network_plugin/calico/templates/calico-typha.yml.j2
index f6e1e8098..65e6606b2 100644
--- a/roles/network_plugin/calico/templates/calico-typha.yml.j2
+++ b/roles/network_plugin/calico/templates/calico-typha.yml.j2
@@ -14,6 +14,12 @@ spec:
       protocol: TCP
       targetPort: calico-typha
       name: calico-typha
+{% if typha_prometheusmetricsenabled %}
+    - port: {{ typha_prometheusmetricsport }}
+      protocol: TCP
+      targetPort: http-metrics
+      name: metrics
+{% endif %}
   selector:
     k8s-app: calico-typha
 
@@ -76,6 +82,11 @@ spec:
         - containerPort: 5473
           name: calico-typha
           protocol: TCP
+{% if typha_prometheusmetricsenabled %}
+        - containerPort: {{ typha_prometheusmetricsport }}
+          name: http-metrics
+          protocol: TCP
+{% endif %}
         envFrom:
         - configMapRef:
             # Allow KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT to be overridden for eBPF mode.
-- 
GitLab