Skip to content

Commit

Permalink
Update gatewayd appVersion to v0.9.7 and refactor configuration for m…
Browse files Browse the repository at this point in the history
…ulti-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.
  • Loading branch information
sinadarbouy authored Sep 24, 2024
1 parent 6984db1 commit 8fe69a3
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: gatewayd
description: Cloud-native database gateway and framework for building data-driven applications, Like API gateways, for databases.
type: application
version: 0.1.0
appVersion: v0.9.6
appVersion: v0.9.7
home: https://www.gatewayd.io
icon: https://github.com/gatewayd-io/docs/blob/main/assets/gatewayd-logotype-light.png
sources:
Expand Down
47 changes: 31 additions & 16 deletions files/gatewayd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,31 @@ metrics:

clients:
default:
network: tcp
address: psql-postgresql.default.svc.cluster.local:5432
tcpKeepAlive: False
tcpKeepAlivePeriod: 30s # duration
receiveChunkSize: 8192
receiveDeadline: 0s # duration, 0ms/0s means no deadline
receiveTimeout: 0s # duration, 0ms/0s means no timeout
sendDeadline: 0s # duration, 0ms/0s means no deadline
dialTimeout: 60s # duration
# Retry configuration
retries: 3 # 0 means no retry and fail immediately on the first attempt
backoff: 1s # duration
backoffMultiplier: 2.0 # 0 means no backoff
disableBackoffCaps: false
writes:
network: tcp
address: psql-postgresql.default.svc.cluster.local:5432
tcpKeepAlive: False
tcpKeepAlivePeriod: 30s # duration
receiveChunkSize: 8192
receiveDeadline: 0s # duration, 0ms/0s means no deadline
receiveTimeout: 0s # duration, 0ms/0s means no timeout
sendDeadline: 0s # duration, 0ms/0s means no deadline
dialTimeout: 60s # duration
# Retry configuration
retries: 3 # 0 means no retry and fail immediately on the first attempt
backoff: 1s # duration
backoffMultiplier: 2.0 # 0 means no backoff
disableBackoffCaps: false

pools:
default:
size: 10
writes:
size: 10

proxies:
default:
healthCheckPeriod: 60s # duration
writes:
healthCheckPeriod: 60s # duration

servers:
default:
Expand All @@ -64,6 +67,18 @@ servers:
certFile: ""
keyFile: ""
handshakeTimeout: 5s # duration
loadBalancer:
strategy: ROUND_ROBIN # ROUND_ROBIN, RANDOM, WEIGHTED_ROUND_ROBIN
consistentHash:
useSourceIp: false
# Optional configuration for strategies that support rules (e.g., WEIGHTED_ROUND_ROBIN)
# loadBalancingRules:
# - condition: "DEFAULT" # Currently, only the "DEFAULT" condition is supported
# distribution:
# - proxyName: "writes"
# weight: 70
# - proxyName: "reads"
# weight: 30

api:
enabled: True
Expand Down
2 changes: 1 addition & 1 deletion files/gatewayd_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ plugins:
- EXIT_ON_STARTUP_ERROR=False
- SENTRY_DSN=https://70eb1abcd32e41acbdfc17bc3407a543@o4504550475038720.ingest.sentry.io/4505342961123328
- CACHE_CHANNEL_BUFFER_SIZE=100
checksum: b153242dfb81dcd63b4444118252be5917b8a1b0f0f775c474946224d2a297eb
checksum: 7a882a6d82105373feb5d2e428d928efd379c240d994b4167a5799d77af3d938
2 changes: 1 addition & 1 deletion templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
labels:
app: gatewayd
data:
GATEWAYD_CLIENTS_DEFAULT_ADDRESS: {{ .Values.gatewayd.clients.default.address }}
GATEWAYD_CLIENTS_DEFAULT_WRITES_ADDRESS: {{ .Values.gatewayd.clients.default.writes.address }}
GATEWAYD_LOGGERS_DEFAULT_LEVEL: {{ .Values.gatewayd.loggers.default.level }}
7 changes: 4 additions & 3 deletions values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
gatewayd:
clients:
default:
address: "psql-postgresql:5432"
writes:
address: "psql-postgresql:5432"
loggers:
default:
# For production, use info
Expand Down Expand Up @@ -96,7 +97,7 @@ podDisruptionBudget:
# maxUnavailable: 1

gatewaydPluginsConfig:
enabled: false
enabled: true

gatewaydConfig:
enabled: false
enabled: true

0 comments on commit 8fe69a3

Please sign in to comment.