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

update policy list v3.13.2 #1404

Merged
merged 2 commits into from
Jun 14, 2023
Merged

update policy list v3.13.2 #1404

merged 2 commits into from
Jun 14, 2023

Conversation

eguzki
Copy link
Member

@eguzki eguzki commented Jun 14, 2023

how to generate policy file

Run apicast

$ cat <<EOF >config.json
{
   "services": [
      {
         "proxy": {
             "hosts": ["one"],
             "proxy_rules": [],
             "api_backend": "https://echo-api.3scale.net",
             "policy_chain": []
         }
      }
   ]
}
EOF

$ docker run -ti --name apicast --rm -v $PWD/config.json:/opt/app/config.json:ro --env THREESCALE_CONFIG_FILE=/opt/app/config.json --env APICAST_LOG_LEVEL=debug --env APICAST_CONFIGURATION_LOADER=lazy --env APICAST_CONFIGURATION_CACHE=0 --env THREESCALE_DEPLOYMENT_ENV=staging --env BACKEND_ENDPOINT_OVERRIDE=http://127.0.0.1:3000 --env APICAST_WORKERS=1 quay.io/3scale/apicast:v3.13.2

Fetch policies

$ APICAST_IP=$(docker inspect apicast | yq e -P '.[0].NetworkSettings.Networks.bridge.IPAddress' -)
$ curl -v -H "Host: one" http://${APICAST_IP}:8090/policies -o policies.latest.json
# pretty print and fix string encoding issues
$ cat policies.latest.json | jq '.' > policies.latest.p.json

@eguzki eguzki marked this pull request as ready for review June 14, 2023 08:30
@eguzki eguzki requested review from a team as code owners June 14, 2023 08:30
@eguzki eguzki merged commit 6e520b1 into master Jun 14, 2023
6 checks passed
@eguzki eguzki deleted the update-policies branch June 14, 2023 09:37
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

Successfully merging this pull request may close these issues.

None yet

2 participants