Skip to content

Commit ee625bd

Browse files
authored
omnisharded tables (#57)
* Omnisharded tables * save
1 parent 7f86d7d commit ee625bd

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: v1
22
name: pgdog
3-
version: v0.32
3+
version: v0.33
44
appVersion: "0.1.22"

templates/config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ data:
188188
{{- end}}
189189
{{- end }}
190190
191+
{{- range .Values.omnishardedTables }}
192+
[[omnisharded_tables]]
193+
database = {{ .database | quote }}
194+
{{- if .sticky }}
195+
sticky = {{ .sticky }}
196+
{{- end }}
197+
tables = {{ .tables | toToml }}
198+
{{- end }}
199+
191200
{{- if or (hasKey .Values "tcpKeepalive") (hasKey .Values "tcpTime") (hasKey .Values "tcpInterval") (hasKey .Values "tcpRetries") }}
192201
[tcp]
193202
{{- if hasKey .Values "tcpKeepalives" }}

test/values-full.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ mirrors:
2929
- sourceDb: primary
3030
destinationDb: replica
3131

32+
omnishardedTables:
33+
- database: primary
34+
sticky: true
35+
tables:
36+
- pg_class
37+
- pg_attribute
38+
- pg_attrdef
39+
- pg_index
40+
- pg_constraint
41+
- pg_namespace
42+
3243
podAnnotations:
3344
prometheus.io/scrape: "true"
3445

values.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,19 @@ shardedTables: []
150150
# shard: 1
151151
shardedMappings: []
152152

153+
# omnishardedTables contains the list of omnisharded table entries in pgdog.toml
154+
# Each entry requires: database and tables; sticky is optional
155+
# Example:
156+
# omnishardedTables:
157+
# - database: "prod"
158+
# sticky: true
159+
# tables:
160+
# - "pg_class"
161+
# - "pg_attribute"
162+
# - "pg_attrdef"
163+
# - "pg_index"
164+
omnishardedTables: []
165+
153166
# service contains the Kubernetes service configuration
154167
service:
155168
# type specifies the type of Kubernetes service

0 commit comments

Comments
 (0)