From 2f78f8e1b78fd72b12f53e637a0ed9c8ba4f0a12 Mon Sep 17 00:00:00 2001 From: Deepak Muley Date: Tue, 14 Sep 2021 16:13:32 -0700 Subject: [PATCH] 2010: fix to expose correct monitoring port (#1405) * 1399: added pod matching label in service selector * correct fix * 2010: fix to expose correct monitoring port training-operator exposes 8080 per logs 2021-09-14T19:31:49.294Z INFO controller-runtime.metrics metrics server is starting to listen {"addr": ":8080"} hence when we do local testing, it works fine but when we expose it using make deploy then inside k8s, its not exposed * reverting fix from other fix-branch * now prometheus will scrape on 8080 --- manifests/base/deployment.yaml | 2 ++ manifests/base/service.yaml | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/manifests/base/deployment.yaml b/manifests/base/deployment.yaml index 416d5ebf5e..536b782dea 100644 --- a/manifests/base/deployment.yaml +++ b/manifests/base/deployment.yaml @@ -21,6 +21,8 @@ spec: - /manager image: kubeflow/training-operator name: training-operator + ports: + - containerPort: 8080 env: - name: MY_POD_NAMESPACE valueFrom: diff --git a/manifests/base/service.yaml b/manifests/base/service.yaml index e95f9f4727..bfc94be622 100644 --- a/manifests/base/service.yaml +++ b/manifests/base/service.yaml @@ -5,15 +5,15 @@ metadata: annotations: prometheus.io/path: /metrics prometheus.io/scrape: "true" - prometheus.io/port: "8443" + prometheus.io/port: "8080" labels: app: training-operator name: training-operator spec: ports: - name: monitoring-port - port: 8443 - targetPort: 8443 + port: 8080 + targetPort: 8080 selector: name: training-operator type: ClusterIP