Skip to content

Commit

Permalink
feat: add pgcat chart.
Browse files Browse the repository at this point in the history
  • Loading branch information
dellnoantechnp committed Dec 6, 2024
1 parent 2d3aff3 commit 601ce6b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
8 changes: 7 additions & 1 deletion charts/pgcat/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,11 @@ description: A Helm chart for PgCat a PostgreSQL pooler and proxy (like PgBounce
maintainers:
- email: team@postgresml.org
name: PostgresML
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
name: pgcat
version: 0.2.6
version: 0.2.7
26 changes: 23 additions & 3 deletions charts/pgcat/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.serviceMonitor.enabled }}
{{- if and .Values.configuration.general.enable_prometheus_exporter .Values.configuration.general.prometheus_exporter_port }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand All @@ -10,15 +11,34 @@ metadata:
{{- end }}
labels:
{{- include "pgcat.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.additionalLabels }}
{{- toYaml .Values.serviceMonitor.additionalLabels | nindent 4 }}
{{- end }}
spec:
{{- if .Values.serviceMonitor.jobLabel }}
jobLabel: {{ .Values.serviceMonitor.jobLabel }}
{{- end }}
selector:
matchLabels:
app.kubernetes.io/component: apollo-portal
{{- include "pgcat.labels" . | nindent 6 }}
endpoints:
- port: http
- port: metrics
path: {{ .Values.serviceMonitor.metricPath | default "/metrics" }}

interval: {{ .Values.serviceMonitor.interval | default 30 }}
{{- if .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.serviceMonitor.relabelings "context" $) | nindent 6 }}
{{- end }}
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.serviceMonitor.metricRelabelings "context" $) | nindent 6 }}
{{- end }}
{{- if .Values.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.serviceMonitor.honorLabels }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
{{- end }}
{{- end }}
6 changes: 2 additions & 4 deletions charts/pgcat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ configuration:
port: 6432

## @param configuration.general.enable_prometheus_exporter Whether to enable prometheus exporter or not.
enable_prometheus_exporter: true
enable_prometheus_exporter: false

## @param configuration.general.prometheus_exporter_port Port at which prometheus exporter listens on.
prometheus_exporter_port: 9930
Expand Down Expand Up @@ -249,9 +249,7 @@ configuration:
pool_mode: "transaction",
users:
[
{
username: "user", password: "pass", pool_size: 5, statement_timeout: 0
}
{username: "user", password: "pass", pool_size: 5, statement_timeout: 0}
],
shards:
[
Expand Down

0 comments on commit 601ce6b

Please sign in to comment.