Skip to content
Open
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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/fatih/color v1.18.0
github.com/google/go-cmp v0.7.0
github.com/kong/go-apiops v0.2.1
github.com/kong/go-database-reconciler v1.30.1
github.com/kong/go-database-reconciler v1.30.2-0.20251202095128-60d0473d15c3
github.com/kong/go-kong v0.70.0
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.9.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/q
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
github.com/kong/go-apiops v0.2.1 h1:6HtyQyOj+CLA86iRtXA6rpTqemp7VqJJ6gpHyNHdB7o=
github.com/kong/go-apiops v0.2.1/go.mod h1:yPwbl3P2eQinVGAEA0d3legaYmzPJ+WtJf9fSeGF4b8=
github.com/kong/go-database-reconciler v1.30.1 h1:ATSYQfyTTiOsWdfjxRjCZZ3nCGu/uQcjyquPuragn94=
github.com/kong/go-database-reconciler v1.30.1/go.mod h1:917AEJhlU+IbONlUIpAy2we3c1VzH94NKYN2bhRscb4=
github.com/kong/go-database-reconciler v1.30.2-0.20251202095128-60d0473d15c3 h1:jFUzZ1YAtjP/swnaPo+874pyH6paW9AKcY0aKLFlJ0g=
github.com/kong/go-database-reconciler v1.30.2-0.20251202095128-60d0473d15c3/go.mod h1:917AEJhlU+IbONlUIpAy2we3c1VzH94NKYN2bhRscb4=
github.com/kong/go-kong v0.70.0 h1:Exug9do74koMme1F8T9kAI0k+ubPQqPDRyv/tGiVwC4=
github.com/kong/go-kong v0.70.0/go.mod h1:J0vGB3wsZ2i99zly1zTRe3v7rOKpkhQZRwbcTFP76qM=
github.com/kong/go-slugify v1.0.0 h1:vCFAyf2sdoSlBtLcrmDWUFn0ohlpKiKvQfXZkO5vSKY=
Expand Down
20 changes: 16 additions & 4 deletions tests/integration/dump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,16 +1002,28 @@ func Test_Dump_SkipDefaults(t *testing.T) {
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.4.0 <3.5.0") },
},
{
name: "dump skip-defaults: consumers, consumer-groups, consumer-group scoped plugins 3.10+",
name: "dump skip-defaults: consumers, consumer-groups, consumer-group scoped plugins >=3.10.0 <3.12.0",
stateFile: "testdata/dump/009-skip-defaults/enterprise/3.10+/consumer-group-scoped.yaml",
expectedFile: "testdata/dump/009-skip-defaults/enterprise/3.10+/consumer-group-scoped.expected.yaml",
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.10.0") },
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.10.0 <3.12.0") },
},
{
name: "dump skip-defaults: consumers, consumer-groups, consumer-group scoped plugins >=3.12.0",
stateFile: "testdata/dump/009-skip-defaults/enterprise/3.12/consumer-group-scoped.yaml",
expectedFile: "testdata/dump/009-skip-defaults/enterprise/3.12/consumer-group-scoped.expected.yaml",
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.12.0") },
},
{
name: "dump skip-defaults: plugins, partials (rla) 3.10+",
name: "dump skip-defaults: plugins, partials (rla) >=3.10.0 <3.12.0",
stateFile: "testdata/dump/009-skip-defaults/enterprise/3.10+/plugin-partial.yaml",
expectedFile: "testdata/dump/009-skip-defaults/enterprise/3.10+/plugin-partial.expected.yaml",
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.10.0") },
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.10.0 <3.12.0") },
},
{
name: "dump skip-defaults: plugins, partials (rla) >=3.12.0",
stateFile: "testdata/dump/009-skip-defaults/enterprise/3.12/plugin-partial.yaml",
expectedFile: "testdata/dump/009-skip-defaults/enterprise/3.12/plugin-partial.expected.yaml",
runWhen: func(t *testing.T) { runWhen(t, "enterprise", ">=3.12.0") },
},
{
name: "dump skip-defaults: plugins (openid-connect) 3.4+",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@ plugins:
client_secret:
- abc-secret
issuer: http://example-issuer.com
redis:
host: null
port: null
session_redis_host: null
session_redis_port: null
enabled: true
name: openid-connect
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ plugins:
connect_timeout: 2000
connection_is_proxied: false
database: 0
host: 127.0.0.1
host: null
keepalive_backlog: null
keepalive_pool_size: 256
password: null
port: 6379
port: null
prefix: null
read_timeout: 2000
send_timeout: 2000
Expand Down Expand Up @@ -287,9 +287,9 @@ plugins:
session_redis_cluster_max_redirections: 5
session_redis_cluster_nodes: null
session_redis_connect_timeout: 2000
session_redis_host: 127.0.0.1
session_redis_host: null
session_redis_password: null
session_redis_port: 6379
session_redis_port: null
session_redis_prefix: null
session_redis_read_timeout: 2000
session_redis_send_timeout: 2000
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
_format_version: "3.0"
consumer_groups:
- name: foo
plugins:
- config:
limit:
- 10
namespace: tPHO9qtcb99zWWUWxSVDQiUpb7kj59ZQ
redis:
host: example.com
strategy: redis
sync_rate: -1
throttling: null
window_size:
- 100
name: rate-limiting-advanced
consumers:
- acls:
- group: my-group
groups:
- name: foo
hmacauth_credentials:
- secret: abcd
username: c1
keyauth_credentials:
- key: abcd
username: c1
- groups:
- name: foo
jwt_secrets:
- algorithm: HS256
key: abc
secret: abcd
tags:
- tag1
tags:
- tag1
username: c2
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
_format_version: "3.0"
consumer_groups:
- name: foo
plugins:
- config:
compound_identifier: null
consumer_groups: null
dictionary_name: kong_rate_limiting_counters
disable_penalty: false
enforce_consumer_groups: false
error_code: 429
error_message: API rate limit exceeded
header_name: null
hide_client_headers: false
identifier: consumer
limit:
- 10
lock_dictionary_name: kong_locks
namespace: tPHO9qtcb99zWWUWxSVDQiUpb7kj59ZQ
path: null
redis:
cluster_addresses: null
cluster_max_redirections: 5
cluster_nodes: null
connect_timeout: 2000
connection_is_proxied: false
database: 0
host: example.com
keepalive_backlog: null
keepalive_pool_size: 256
password: null
port: 6379
read_timeout: 2000
redis_proxy_type: null
send_timeout: 2000
sentinel_addresses: null
sentinel_master: null
sentinel_nodes: null
sentinel_password: null
sentinel_role: null
sentinel_username: null
server_name: null
ssl: false
ssl_verify: false
timeout: 2000
username: null
retry_after_jitter_max: 0
strategy: redis
sync_rate: -1
throttling: null
window_size:
- 100
window_type: sliding
name: rate-limiting-advanced
consumers:
- acls:
- group: my-group
groups:
- name: foo
hmacauth_credentials:
- secret: abcd
username: c1
keyauth_credentials:
- key: abcd
username: c1
- groups:
- name: foo
jwt_secrets:
- algorithm: HS256
key: abc
secret: abcd
tags:
- tag1
tags:
- tag1
username: c2
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
_format_version: "3.0"
partials:
- config:
host: example.com
keepalive_backlog: 0
password: redis-pass
username: redis-user
id: 65a8785d-2e4a-4adb-8805-63e1141219cd
name: my-partial-ee
tags:
- tag1
type: redis-ee
plugins:
- config:
limit:
- 10
namespace: 1jN8MwEfPOC5LEb4noafwYJEQiafdPnA
strategy: redis
sync_rate: -1
throttling: null
window_size:
- 100
enabled: true
name: rate-limiting-advanced
partials:
- id: 65a8785d-2e4a-4adb-8805-63e1141219cd
name: my-partial-ee
path: config.redis
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
_format_version: "3.0"
partials:
- config:
cluster_max_redirections: 5
cluster_nodes: null
connect_timeout: 2000
connection_is_proxied: false
database: 0
host: example.com
keepalive_backlog: 0
keepalive_pool_size: 256
password: redis-pass
port: 6379
read_timeout: 2000
send_timeout: 2000
sentinel_master: null
sentinel_nodes: null
sentinel_password: null
sentinel_role: null
sentinel_username: null
server_name: null
ssl: false
ssl_verify: false
username: redis-user
id: 65a8785d-2e4a-4adb-8805-63e1141219cd
name: my-partial-ee
tags:
- tag1
type: redis-ee
plugins:
- config:
compound_identifier: null
consumer_groups: null
dictionary_name: kong_rate_limiting_counters
disable_penalty: false
enforce_consumer_groups: false
error_code: 429
error_message: API rate limit exceeded
header_name: null
hide_client_headers: false
identifier: consumer
limit:
- 10
lock_dictionary_name: kong_locks
namespace: 1jN8MwEfPOC5LEb4noafwYJEQiafdPnA
path: null
retry_after_jitter_max: 0
strategy: redis
sync_rate: -1
window_size:
- 100
window_type: sliding
enabled: true
name: rate-limiting-advanced
partials:
- id: 65a8785d-2e4a-4adb-8805-63e1141219cd
name: my-partial-ee
path: config.redis
protocols:
- grpc
- grpcs
- http
- https
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ plugins:
client_secret:
- abcd
issuer: http://example.com
session_redis_host: null
enabled: true
name: openid-connect
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ plugins:
session_redis_cluster_max_redirections: null
session_redis_cluster_nodes: null
session_redis_connect_timeout: null
session_redis_host: 127.0.0.1
session_redis_host: null
session_redis_password: null
session_redis_port: 6379
session_redis_prefix: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ consumer_groups:
- 10
namespace: tPHO9qtcb99zWWUWxSVDQiUpb7kj59ZQ
redis:
cloud_authentication: null
host: example.com
strategy: redis
sync_rate: -1
throttling: null
window_size:
- 100
name: rate-limiting-advanced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ consumer_groups:
retry_after_jitter_max: 0
strategy: redis
sync_rate: -1
throttling:
enabled: false
interval: 5
queue_limit: 5
retry_times: 3
throttling: null
window_size:
- 100
window_type: sliding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ plugins:
- abc-client
client_secret:
- abc-secret
cluster_cache_redis:
cloud_authentication: null
issuer: http://example-issuer.com
redis:
cloud_authentication: null
enabled: true
name: openid-connect
Loading