Skip to content

Commit

Permalink
Merge branch 'main' into NO-JIRA-fix-bitstring-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
shotexa authored Jul 29, 2024
2 parents 173e241 + cf3ccbe commit d5cda43
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
14 changes: 14 additions & 0 deletions infrastructure/charts/agent/templates/podmonitor-postgresql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.database.postgres.metrics.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: postgres-metrics
namespace: {{ .Release.Namespace }}
spec:
podMetricsEndpoints:
- path: /metrics
port: exporter
selector:
matchLabels:
application: spilo
{{- end }}
25 changes: 25 additions & 0 deletions infrastructure/charts/agent/templates/postgresql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,31 @@ spec:
agent: agent-admin
postgresql:
version: "14"
{{- if .Values.database.postgres.metrics.enabled }}
sidecars:
- name: exporter
image: "{{ .Values.database.postgres.metrics.image.repository }}/{{ .Values.database.postgres.metrics.image.tag }}:{{ .Values.database.postgres.metrics.image.version }}"
args:
- --collector.stat_statements
ports:
- name: exporter
containerPort: 9187
protocol: TCP
resources:
limits:
cpu: 500m
memory: 256M
requests:
cpu: 100m
memory: 256M
env:
- name: DATA_SOURCE_URI
value: "127.0.0.1:5432"
- name: DATA_SOURCE_USER
value: "$(POSTGRES_USER)"
- name: DATA_SOURCE_PASS
value: "$(POSTGRES_PASSWORD)"
{{- end }}

{{- if .Values.keycloak.enabled }}
---
Expand Down
6 changes: 6 additions & 0 deletions infrastructure/charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ server:

database:
postgres:
metrics:
enabled: false
image:
repository: quay.io/prometheuscommunity
tag: postgres-exporter
version: v0.15.0
managingTeam: atala
databaseSize: 4Gi
numberOfInstances: 2
Expand Down

0 comments on commit d5cda43

Please sign in to comment.