forked from CrunchyData/postgres-operator-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 CrunchyData#61 Signed-off-by: Alex Szakaly <[email protected]>
- Loading branch information
1 parent
24f5849
commit b1afa50
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
{{- include "install.labels" . | nindent 4 }} | ||
name: {{ .Chart.Name }} | ||
spec: | ||
ports: | ||
- name: metrics | ||
port: 9090 | ||
protocol: TCP | ||
targetPort: metrics | ||
selector: | ||
{{- include "install.crunchyLabels" . | nindent 5 }} |