Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[Policy] Allow map variables for policy key #5114

Closed
lucaspouzac opened this issue Feb 16, 2024 · 1 comment
Closed

[Policy] Allow map variables for policy key #5114

lucaspouzac opened this issue Feb 16, 2024 · 1 comment
Labels
proposal An issue that proposes a feature request

Comments

@lucaspouzac
Copy link

Is your feature request related to a problem? Please describe.
Actually, it's not possible to use map on key of policy, if we used nginx CRDs. It's ok if we declare manually this on http-snippets, we cannot re-use it on VirtualServerRoute easily.

Describe the solution you'd like
We would like to be able to use a map as a key variable like ${map_(mapName)}

Describe alternatives you've considered
Manual declaration, without CRDs usage.

geo $ip_whitelist {
    default             limited;
    8.8.8.8/32         nolimit;  
    127.0.0.1/32     nolimit; 
}

map $ip_whitelist $limit {
    limited  $binary_remote_addr;
    nolimit  "";
}

limit_req_zone $limit zone=reqWhitelist:10m rate=10r/s;

Additional context
https://github.com/nginxinc/kubernetes-ingress/blob/v3.4.2/pkg/apis/configuration/validation/policy.go#L479

@lucaspouzac lucaspouzac added the proposal An issue that proposes a feature request label Feb 16, 2024
Copy link

Hi @lucaspouzac thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@nginx nginx locked and limited conversation to collaborators Feb 16, 2024
@brianehlert brianehlert converted this issue into discussion #5116 Feb 16, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
proposal An issue that proposes a feature request
Projects
None yet
Development

No branches or pull requests

1 participant