Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 10a4d8b

Browse files
committedOct 17, 2022
Expose Prometheus Metrics Server with k8s Service
To let us able to scrape metrics from the Operator e.g. with a ServiceMonitor we need to have a Service which provides named port close #61 Signed-off-by: Alex Szakaly <[email protected]>
1 parent 206cc6a commit 10a4d8b

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed
 

Diff for: ‎helm/install/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ description: Installer for PGO, the open source Postgres Operator from Crunchy D
44

55
type: application
66
# The version below should match the version on the PostgresCluster CRD
7-
version: 0.6.0
7+
version: 0.6.1
88
appVersion: 5.2.0

Diff for: ‎helm/install/templates/manager.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ spec:
4040
- name: CHECK_FOR_UPGRADES
4141
value: "false"
4242
{{- end }}
43+
ports:
44+
- containerPort: 8080
45+
name: metrics
4346
securityContext:
4447
allowPrivilegeEscalation: false
4548
capabilities: { drop: [ALL] }

Diff for: ‎helm/install/templates/service.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
labels:
5+
{{- include "install.labels" . | nindent 4 }}
6+
{{- include "install.clusterLabels" . | nindent 4 }}
7+
name: {{ .Chart.Name }}
8+
spec:
9+
ports:
10+
- name: metrics
11+
port: 9090
12+
protocol: TCP
13+
targetPort: metrics
14+
selector:
15+
{{- include "install.clusterLabels" . | nindent 4 }}

0 commit comments

Comments
 (0)
Please sign in to comment.