Skip to content

Commit

Permalink
2010: fix to expose correct monitoring port (#1405)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
deepak-muley committed Sep 14, 2021
1 parent 1aa44a6 commit 2f78f8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ spec:
- /manager
image: kubeflow/training-operator
name: training-operator
ports:
- containerPort: 8080
env:
- name: MY_POD_NAMESPACE
valueFrom:
Expand Down
6 changes: 3 additions & 3 deletions manifests/base/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2f78f8e

Please sign in to comment.