Skip to content

Commit

Permalink
feat(redis) support spec tests with redis cluster
Browse files Browse the repository at this point in the history
Kong currently does not support connection to redis cluster and will
be fixed in FTI-2104.

For pongo to support redis cluster, we need to define the Pongo
network with custom subnet (required by Docker Compose).

Also, we should support an ENV to load redis cluster seeds:
KONG_SPEC_TEST_REDIS_CLUSTER_ADDRESSES
  • Loading branch information
outsinre committed Aug 15, 2022
1 parent 267505b commit 91bcb8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ version: '3.5'
networks:
pongo-test-network:
name: ${SERVICE_NETWORK_NAME}
driver: bridge
attachable: true
ipam:
config:
- subnet: 192.168.56.0/21
gateway: 192.168.56.1

services:
expose:
Expand Down
2 changes: 2 additions & 0 deletions assets/pongo_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export KONG_LOG_LEVEL=debug
export KONG_SPEC_REDIS_HOST=redis
# Kong test-helpers 3.0.0+
export KONG_SPEC_TEST_REDIS_HOST=redis
# Support Redis Cluster
export KONG_SPEC_TEST_REDIS_CLUSTER_ADDRESSES='["rc-node-1:6379","rc-node-2:6379","rc-node-3:6379"]'

# set the certificate store
export KONG_LUA_SSL_TRUSTED_CERTIFICATE=/etc/ssl/certs/ca-certificates.crt
Expand Down

0 comments on commit 91bcb8d

Please sign in to comment.