Skip to content

feat: Allow proxy_cache zones to be configured from values.yaml#802

Open
brmejia wants to merge 7 commits into
apache:masterfrom
brmejia:ft/proxy-cache-zones
Open

feat: Allow proxy_cache zones to be configured from values.yaml#802
brmejia wants to merge 7 commits into
apache:masterfrom
brmejia:ft/proxy-cache-zones

Conversation

@brmejia
Copy link
Copy Markdown

@brmejia brmejia commented Jan 30, 2025

This PR add missing functionality reported here #667

Additional proxy_cache zones can be defined using values.yaml like this:

apisix:
  proxy_cache:
    zones:
      - name: memory_cache
        memory_size: 256m

@brmejia
Copy link
Copy Markdown
Author

brmejia commented Mar 24, 2025

Could someone give feedback or review this PR?
Thanks

@oksman
Copy link
Copy Markdown

oksman commented Oct 28, 2025

This would be a very nice feature! Currently it seems we need to overwrite the whole config.yaml which isn't that nice.

@brmejia brmejia force-pushed the ft/proxy-cache-zones branch from 6d9a3aa to 7d459c1 Compare January 19, 2026 09:03
@Baoyuantop Baoyuantop added the enhancement New feature or request label Apr 9, 2026
Copy link
Copy Markdown
Contributor

@Baoyuantop Baoyuantop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this feature. The direction is useful because it turns the #667 workaround into an explicit values.yaml entry.

I do not think this is ready to merge yet. There are two points that should be addressed first:

  1. The new schema is added as a top-level proxy_cache, while the actual template and docs use apisix.proxy_cache.zones. That means the schema does not validate the values path users will actually configure. Please either move the schema to the real values path or explain the current schema structure and add validation evidence.

  2. This PR changes APISIX startup config rendering, but I do not see a helm template/chart-testing case showing a custom proxy_cache.zones entry rendered correctly. Please add a minimal rendering verification covering name/memory_size and the optional disk/cache_levels fields.

Also, the toYaml -> fromYaml -> len check in the template is not very clear for a list value. Using with or checking the list length directly would be easier to maintain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants