All Projects → raoxiaoyan → kong-plugins-canary

raoxiaoyan / kong-plugins-canary

Licence: MIT license
The grayscale plug-in based on gateway Kong, called Canary, meets A/B testing and dynamically switches upstream agents

Programming Languages

lua
6591 projects

Projects that are alternatives of or similar to kong-plugins-canary

phx-auth-api
Authentication for Phoenix with JWT, user privileges and CI
Stars: ✭ 13 (-58.06%)
Mutual labels:  canary
kongsul
Kong Api Gateway with Consul Service Discovery (MicroService)
Stars: ✭ 35 (+12.9%)
Mutual labels:  kong
lua-circuit-breaker
Circuit breaker pattern in Lua
Stars: ✭ 28 (-9.68%)
Mutual labels:  kong
nginx-canary
nginx with canary release strategy
Stars: ✭ 43 (+38.71%)
Mutual labels:  canary
kong-plugin-url-rewrite
Kong API Gateway plugin for url-rewrite purposes
Stars: ✭ 43 (+38.71%)
Mutual labels:  kong
kongverge
A desired state configuration tool for Kong
Stars: ✭ 23 (-25.81%)
Mutual labels:  kong
iter8-analytics
AI-engine that powers Iter8
Stars: ✭ 16 (-48.39%)
Mutual labels:  canary
kong-js-pdk
Kong PDK for Javascript and plugin server
Stars: ✭ 28 (-9.68%)
Mutual labels:  kong
MPContribs
Platform for materials scientists to contribute and disseminate their materials data through Materials Project
Stars: ✭ 30 (-3.23%)
Mutual labels:  kong
Discord-Datamining
Datamining Discord changes from the JS files
Stars: ✭ 1,441 (+4548.39%)
Mutual labels:  canary
Flagger
Progressive delivery Kubernetes operator (Canary, A/B Testing and Blue/Green deployments)
Stars: ✭ 3,337 (+10664.52%)
Mutual labels:  canary
K8s Deployment Strategies
Kubernetes deployment strategies explained
Stars: ✭ 2,649 (+8445.16%)
Mutual labels:  canary
kanarini
Canary Deployment Controller for Kubernetes
Stars: ✭ 32 (+3.23%)
Mutual labels:  canary
PowerShell-FeatureFlags
PowerShell module containing a Feature Flags implementation based on a local config file.
Stars: ✭ 15 (-51.61%)
Mutual labels:  canary
transparency
Read-only mirror of https://owo.codes/whats-this/transparency
Stars: ✭ 13 (-58.06%)
Mutual labels:  canary
gke-demo
Demonstration of complete, fully-featured CI/CD and cloud automation for microservices, done with GCP/GKE
Stars: ✭ 47 (+51.61%)
Mutual labels:  canary
kong-init
Declarative configuration tool for Kong
Stars: ✭ 38 (+22.58%)
Mutual labels:  kong
docker-kong-oidc
Kong + OIDC plugins
Stars: ✭ 83 (+167.74%)
Mutual labels:  kong
kong-plugin-api-response-merger
Kong API response merger plugin
Stars: ✭ 14 (-54.84%)
Mutual labels:  kong
meshery-kuma
Meshery Adapter for Kuma
Stars: ✭ 35 (+12.9%)
Mutual labels:  kong

Canary金丝雀插件[基于kong]

0. 概述

基于kong[基于1.2.1版本]网关灰度插件

canary插件的使用范围支持global、service、route

1.应用场景

  • 灰度上线、版本迭代(灰度的量灵活切换)

  • 特殊用户、特别版本(灰度的方式多样化)

2. canary插件设计原理

avatar

3. 安装说明

https://luarocks.org/modules/raoxiaoyan/canary

luarocks install canary

启用canary,在/etc/kong/kong.conf增加如下配置:

plugins = bundled,canary

kong restart 重启即可

4. canary配置界面

推荐使用kongx进行管理 avatar

5. 配置参数说明

5.1 canary_upstream

canary_upstream为必填项,设置默认转发的上游代理名称,如下所示:

msgbox.upstream

灰度规则1:ip

range

设置ip支持单个,多个,范围分段IP(满足CIDR notation规则),以下值都为合法

10.0.2.2 
10.0.5.0/2

upstream

非必填项,设置符合ip灰度规则时,转发的上游代理名称

灰度规则2:uid

on

uid的参数从哪里获取;参数所处位置可选为:

header:请求头中获取uid参数

cookie:从cookie中获取uid参数

args:从请求参数中获取uid参数

name

uid在请求中的参数名

range

设置uid的匹配规则,支持单个,多个,正则匹配(前缀、后缀等)

1234
^UID%d+$ //匹配前缀

upstream

非必填项,设置符合uid灰度规则时,转发的上游代理名称

灰度规则3:customize

自定义规则

on

自定义的参数从哪里获取;参数所处位置可选为:

header:请求头中获取uid参数

cookie:从cookie中获取uid参数

args:从请求参数中获取uid参数

name

请求中的参数名,例如:region(地域)

range

设置匹配规则,支持单个,多个,正则匹配(前缀、后缀等)

SD001
^BJ%d+$ //匹配前缀

upstream

非必填项,设置符合该灰度规则时,转发的上游代理名称

规则优先级

默认情况下,未设置任何灰度规则时,默认灰度规则生效

优先级如下:

ip > uid > customize > default

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].