diff --git a/app/_src/gateway/breaking-changes/38x.md b/app/_src/gateway/breaking-changes/38x.md index cc8be33036bd..ef5c5bcd7236 100644 --- a/app/_src/gateway/breaking-changes/38x.md +++ b/app/_src/gateway/breaking-changes/38x.md @@ -8,11 +8,32 @@ chapter: 10 Before upgrading, review any configuration or breaking changes in this version and prior versions that affect your current installation. -You may need to adopt different [upgrade paths](/gateway/{{page.release}}/upgrade/#guaranteed-upgrade-paths) depending on your +You may need to adopt different [upgrade paths](/gateway/{{page.release}}/upgrade/#guaranteed-upgrade-paths) depending on your deployment methods, set of features in use, or custom plugins, for example. Review the [changelog](/gateway/changelog/#3800) for all the changes in this release. ## Breaking changes and deprecations -TBA \ No newline at end of file +### Custom plugins that used shared Redis config + +In 3.8.0.0 version we have changed and refactored the shared Redis configuration that previously was imported by `require "kong.enterprise_edition.redis"`. If you have created a custom plugin that is using this shared configuration or if you have a forked version +of a plugin (ex. `rate-limiting-advanced`) then there might be additional steps that would require you to upgrade to version 2 of this Redis config. + +Out of the box the custom plugins should still be working since the old shared configuration was left in place. The new config adds `cluster_max_redirections` option for Redis Cluster and the format of `cluster_nodes` and +`sentinel_nodes` has been changed. Apart from that - the intialization step is not required anymore. + +#### Shared Redis Config: How to upgrade custom plugins + +If your plugin is using shared Redis config - i.e. you import: `require "kong.enterprise_edition.redis"` you should do the following steps: + +1. Remove library intialization call: `redis.init_conf(conf)` - where `redis` is `local redis = require "kong.enterprise_edition.redis"` +2. Switch the imports of redis from `local redis = require "kong.enterprise_edition.redis"` to `local redis = require "kong.enterprise_edition.tools.redis.v2"` + +#### Rate-Limiting library: How to upgrade custom plugins + +If your plugin is using Rate-Limiting library - i.e. you import `local ratelimiting = require("kong.tools.public.rate-limiting").new_instance("your-plugin-name")` you should do the following steps: + +1. Switch the imports of: + 1. Shared Redis config: `local redis = require "kong.enterprise_edition.redis"` to `local redis = require "kong.enterprise_edition.tools.redis.v2"` + 2. Rate-Limiting library: `local ratelimiting = require("kong.tools.public.rate-limiting").new_instance("your-plugin-name")` to `local ratelimiting = require("kong.tools.public.rate-limiting").new_instance("your-plugin-name", { redis_config_version = "v2" })`