Skip to content

Commit 8fe69a3

Browse files
authored
Update gatewayd appVersion to v0.9.7 and refactor configuration for multi-proxy support (#15)
- Bump `appVersion` to v0.9.7 in `Chart.yaml`. - Refactor gatewayd configuration to support multi-proxy setup: - Introduce separate `writes` configuration under `clients`, `pools`, and `proxies`. - Enable load balancing strategies for multiple proxies, including `ROUND_ROBIN` and `WEIGHTED_ROUND_ROBIN`. - Enable `gatewaydConfig` and `gatewaydPluginsConfig`. - Update `ConfigMap` template to align with the new multi-proxy configuration.
1 parent 6984db1 commit 8fe69a3

File tree

5 files changed

+38
-22
lines changed

5 files changed

+38
-22
lines changed

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: gatewayd
33
description: Cloud-native database gateway and framework for building data-driven applications, Like API gateways, for databases.
44
type: application
55
version: 0.1.0
6-
appVersion: v0.9.6
6+
appVersion: v0.9.7
77
home: https://www.gatewayd.io
88
icon: https://github.com/gatewayd-io/docs/blob/main/assets/gatewayd-logotype-light.png
99
sources:

files/gatewayd.yaml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,31 @@ metrics:
3131

3232
clients:
3333
default:
34-
network: tcp
35-
address: psql-postgresql.default.svc.cluster.local:5432
36-
tcpKeepAlive: False
37-
tcpKeepAlivePeriod: 30s # duration
38-
receiveChunkSize: 8192
39-
receiveDeadline: 0s # duration, 0ms/0s means no deadline
40-
receiveTimeout: 0s # duration, 0ms/0s means no timeout
41-
sendDeadline: 0s # duration, 0ms/0s means no deadline
42-
dialTimeout: 60s # duration
43-
# Retry configuration
44-
retries: 3 # 0 means no retry and fail immediately on the first attempt
45-
backoff: 1s # duration
46-
backoffMultiplier: 2.0 # 0 means no backoff
47-
disableBackoffCaps: false
34+
writes:
35+
network: tcp
36+
address: psql-postgresql.default.svc.cluster.local:5432
37+
tcpKeepAlive: False
38+
tcpKeepAlivePeriod: 30s # duration
39+
receiveChunkSize: 8192
40+
receiveDeadline: 0s # duration, 0ms/0s means no deadline
41+
receiveTimeout: 0s # duration, 0ms/0s means no timeout
42+
sendDeadline: 0s # duration, 0ms/0s means no deadline
43+
dialTimeout: 60s # duration
44+
# Retry configuration
45+
retries: 3 # 0 means no retry and fail immediately on the first attempt
46+
backoff: 1s # duration
47+
backoffMultiplier: 2.0 # 0 means no backoff
48+
disableBackoffCaps: false
4849

4950
pools:
5051
default:
51-
size: 10
52+
writes:
53+
size: 10
5254

5355
proxies:
5456
default:
55-
healthCheckPeriod: 60s # duration
57+
writes:
58+
healthCheckPeriod: 60s # duration
5659

5760
servers:
5861
default:
@@ -64,6 +67,18 @@ servers:
6467
certFile: ""
6568
keyFile: ""
6669
handshakeTimeout: 5s # duration
70+
loadBalancer:
71+
strategy: ROUND_ROBIN # ROUND_ROBIN, RANDOM, WEIGHTED_ROUND_ROBIN
72+
consistentHash:
73+
useSourceIp: false
74+
# Optional configuration for strategies that support rules (e.g., WEIGHTED_ROUND_ROBIN)
75+
# loadBalancingRules:
76+
# - condition: "DEFAULT" # Currently, only the "DEFAULT" condition is supported
77+
# distribution:
78+
# - proxyName: "writes"
79+
# weight: 70
80+
# - proxyName: "reads"
81+
# weight: 30
6782

6883
api:
6984
enabled: True

files/gatewayd_plugins.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ plugins:
2727
- EXIT_ON_STARTUP_ERROR=False
2828
- SENTRY_DSN=https://70eb1abcd32e41acbdfc17bc3407a543@o4504550475038720.ingest.sentry.io/4505342961123328
2929
- CACHE_CHANNEL_BUFFER_SIZE=100
30-
checksum: b153242dfb81dcd63b4444118252be5917b8a1b0f0f775c474946224d2a297eb
30+
checksum: 7a882a6d82105373feb5d2e428d928efd379c240d994b4167a5799d77af3d938

templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ metadata:
55
labels:
66
app: gatewayd
77
data:
8-
GATEWAYD_CLIENTS_DEFAULT_ADDRESS: {{ .Values.gatewayd.clients.default.address }}
8+
GATEWAYD_CLIENTS_DEFAULT_WRITES_ADDRESS: {{ .Values.gatewayd.clients.default.writes.address }}
99
GATEWAYD_LOGGERS_DEFAULT_LEVEL: {{ .Values.gatewayd.loggers.default.level }}

values.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
gatewayd:
22
clients:
33
default:
4-
address: "psql-postgresql:5432"
4+
writes:
5+
address: "psql-postgresql:5432"
56
loggers:
67
default:
78
# For production, use info
@@ -96,7 +97,7 @@ podDisruptionBudget:
9697
# maxUnavailable: 1
9798

9899
gatewaydPluginsConfig:
99-
enabled: false
100+
enabled: true
100101

101102
gatewaydConfig:
102-
enabled: false
103+
enabled: true

0 commit comments

Comments
 (0)