-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: allow to use environment variables for limit-count plugin settings #10607
feat: allow to use environment variables for limit-count plugin settings #10607
Conversation
@ikatlinsky thank you for your contribution 👍 |
apisix/plugins/limit-count/init.lua
Outdated
@@ -68,6 +68,7 @@ local policy_to_additional_properties = { | |||
type = "boolean", default = false, | |||
}, | |||
}, | |||
encrypt_fields = {"redis_username", "redis_password"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the redis_username
need to be encrypted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, not really, will fix that
"count": 2, | ||
"time_window": 60, | ||
"rejected_code": 503, | ||
"key": "$ENV://LIMIT_COUNT_KEY" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same reasoning as above
apisix/plugins/limit-count/init.lua
Outdated
@@ -68,6 +68,7 @@ local policy_to_additional_properties = { | |||
type = "boolean", default = false, | |||
}, | |||
}, | |||
encrypt_fields = {"redis_password"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not correct, please refer to https://github.com/apache/apisix/blob/master/apisix/plugins/kafka-proxy.lua#L36, and add a corresponding test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your are correct, that i am doing 2 different things in a single PR, let me ever this change
@monkeyDluffy6017 looking at failing tests (https://github.com/apache/apisix/actions/runs/7124716224/job/19435705333?pr=10607) and it seems like tests for multiple plugins are failed, like request id, openwisk and etc. It that something that is expected? Not sure if my changes can break other plugins. Thanks |
@ikatlinsky It has nothing to do with you changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please resolve the conflicts
done |
Description
As per #10597.
Fixes #10597
Checklist