Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b1afa50

Browse files
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 <alex.szakaly@gmail.com>
1 parent 24f5849 commit b1afa50

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

‎helm/install/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: pgo
33
description: Installer for PGO, the open source Postgres Operator from Crunchy Data
44
type: application
5-
version: 0.2.3
5+
version: 0.2.4
66
appVersion: 5.0.4

‎helm/install/templates/manager.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ spec:
2929
- name: PGO_TARGET_NAMESPACE
3030
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
3131
{{- end }}
32+
ports:
33+
- containerPort: 8080
34+
name: metrics
3235
securityContext:
3336
allowPrivilegeEscalation: false
3437
readOnlyRootFilesystem: true

‎helm/install/templates/service.yaml

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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /