Skip to content
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

[Question] Override policies in higher environments #657

Closed
karthikpeddi115 opened this issue Sep 11, 2024 · 3 comments
Closed

[Question] Override policies in higher environments #657

karthikpeddi115 opened this issue Sep 11, 2024 · 3 comments

Comments

@karthikpeddi115
Copy link

Release version

v6.0.1.1

Question Details

Hi Team,
We have a requirement to override the policies which are resided under extracted artifacts folder.
artifacts/apis/apiname/operations/policy.xml

Picture1

We came to know that we need to use named values to override the above policies, but as per our artifacts, namedvalues has a different information which is looking like below.

Picture2

I have gone through closed cases and it is more likely looking like this case #300 and #281

Not able to understand, how can I override over policy.xml details in the below named values. Can you please make an example for the same?

Picture3

Expected behavior

As per the first image, I want to override rate limit value in the policy from 40 to 100 in higher environments.

Actual behavior

Not able to find solution on how to override policy details using namedvalues, please provide an example.

Reproduction Steps

Not able to find solution on how to override policy details using namedvalues, please provide an example.

Copy link

  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.

@karthikpeddi115 karthikpeddi115 changed the title [Question] [Question] Override policies in higher environments Sep 11, 2024
@riosengineer
Copy link

riosengineer commented Sep 12, 2024

You need to create a namedValue across each APIM instance that has the same name, e.g. rateLimitValue

Your policy XML will simply contain a variable of this name instead of the numerical value currently:

{{rateLimitValue}}

Then using the override prod.yaml file you can simply override the value for each higher instance like so:

namedValues:
- name: rateLimitValue
  properties:
    displayName: rateLimitValue
    secret: false
    value: 100

@waelkdouh
Copy link
Contributor

@karthikpeddi115 please search open and closed issues before opening new ones. This has been discussed in the past.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants