Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
name: pgdog
version: v0.45
version: v0.46
appVersion: "0.1.30"
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,22 @@ The `queueConfig` settings use Prometheus defaults and can be tuned
for performance. Remote write is automatically enabled when `url` is
set.

### Plugins

Add plugins to the `plugins` list. Each plugin requires a `name`; `config` is
optional and accepts inline TOML content. When `config` is provided, a
`<name>.toml` file is added to the ConfigMap and mounted at
`/etc/pgdog/<name>.toml`.

```yaml
plugins:
- name: pgdog_routing
config: |
[routing]
key = "value"
- name: pgdog_auth
```

### TCP Keep-Alive Configuration

Configure socket-level TCP keep-alive behavior (optional):
Expand Down
14 changes: 14 additions & 0 deletions templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ data:
tables = {{ .tables | toToml }}
{{- end }}

{{- range .Values.plugins }}
[[plugins]]
name = {{ .name | quote }}
{{- if .config }}
config = "/etc/pgdog/{{ .name }}.toml"
{{- end }}
{{- end }}

{{- if or (hasKey .Values "tcpKeepalive") (hasKey .Values "tcpTime") (hasKey .Values "tcpInterval") (hasKey .Values "tcpRetries") }}
[tcp]
{{- if hasKey .Values "tcpKeepalive" }}
Expand Down Expand Up @@ -307,3 +315,9 @@ data:
split_inserts = {{ .Values.rewrite.splitInserts | default "error" | quote }}
primary_key = {{ .Values.rewrite.primaryKey | default "ignore" | quote }}
{{- end }}
{{- range .Values.plugins }}
{{- if .config }}
{{ .name }}.toml: |
{{ .config | indent 8 }}
{{- end }}
{{- end }}
7 changes: 7 additions & 0 deletions test/values-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ omnishardedTables:
- pg_constraint
- pg_namespace

plugins:
- name: pgdog_routing
config: |
[routing]
key = "value"
- name: pgdog_auth

podAnnotations:
prometheus.io/scrape: "true"

Expand Down
12 changes: 12 additions & 0 deletions test/values-plugins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Plugins configuration test
databases:
- name: primary
host: postgres-primary.example.com
port: 5432

plugins:
- name: pgdog_routing
config: |
[routing]
key = "value"
- name: pgdog_auth
13 changes: 13 additions & 0 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,19 @@ shardedMappings: []
# - "pg_index"
omnishardedTables: []

# plugins contains the list of plugin entries in pgdog.toml
# Each entry requires: name; config is optional (inline TOML content)
# When config is provided, a <name>.toml file is added to the ConfigMap
# and the plugin config path is set to /etc/pgdog/<name>.toml
# Example:
# plugins:
# - name: "pgdog_routing"
# config: |
# [routing]
# key = "value"
# - name: "pgdog_auth"
plugins: []

# service contains the Kubernetes service configuration
service:
# type specifies the type of Kubernetes service
Expand Down
Loading