Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions charts/apisix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ The command removes all the Kubernetes components associated with the chart and
| apisix.prometheus.enabled | bool | `false` | |
| apisix.prometheus.metricPrefix | string | `"apisix_"` | prefix of the metrics |
| apisix.prometheus.path | string | `"/apisix/prometheus/metrics"` | path of the metrics endpoint |
| apisix.proxy_cache | object | `{"zones":[]}` | Customize APISIX proxy_cache plugin settings. |
| apisix.proxy_cache.zones | list | `[]` | Customize additional cache zones. See [proxy_cache plugin](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/#enable-plugin) |
| apisix.router.http | string | `"radixtree_host_uri"` | Defines how apisix handles routing: - radixtree_uri: match route by uri(base on radixtree) - radixtree_host_uri: match route by host + uri(base on radixtree) - radixtree_uri_with_parameter: match route by uri with parameters |
| apisix.setIDFromPodUID | bool | `false` | Use Pod metadata.uid as the APISIX id. |
| apisix.ssl.additionalContainerPorts | list | `[]` | Support multiple https ports, See [Configuration](https://github.com/apache/apisix/blob/0bc65ea9acd726f79f80ae0abd8f50b7eb172e3d/conf/config-default.yaml#L99) |
Expand Down
8 changes: 7 additions & 1 deletion charts/apisix/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,19 @@ data:
# disk_size: 1G
# disk_path: "/tmp/disk_cache_two"
# cache_levels: "1:2"
{{- if .Values.apisix.proxy_cache.zones }}
{{- $zones := toYaml .Values.apisix.proxy_cache.zones -}}
{{- if gt (len ($zones | fromYaml)) 0 }}
{{- $zones | nindent 8 }}
{{- end }}
{{- end }}

router:
http: {{ .Values.apisix.router.http }} # radixtree_uri: match route by uri(base on radixtree)
# radixtree_host_uri: match route by host + uri(base on radixtree)
# radixtree_uri_with_parameter: match route by uri with parameters
ssl: 'radixtree_sni' # radixtree_sni: match route by SNI(base on radixtree)

{{- $proxy_mode := "" }}
{{- if and .Values.service.stream.enabled .Values.service.http.enabled }}
{{- $proxy_mode = "http&stream" }}
Expand Down
34 changes: 34 additions & 0 deletions charts/apisix/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,40 @@
"minItems": 0,
"uniqueItems": true
},
"proxy_cache": {
"description": "APISIX proxy_cache zones settings",
"type": "object",
"properties": {
"zones": {
"type": "array",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"memory_size": {
"type": "string",
"minLength": 2
},
"disk_size": {
"type": "string",
"minLength": 2
},
"disk_path": {
"type": "string"
},
"cache_levels": {
"type": "string"
}
},
"required": ["name", "memory_size"]
}
}
}
},
"customPlugins": {
"description": "customPlugins allows you to mount your own HTTP plugins",
"type": "object",
Expand Down
4 changes: 4 additions & 0 deletions charts/apisix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ apisix:
plugins: []
# -- Customize the list of APISIX stream_plugins to enable. By default, APISIX's default stream_plugins are automatically used. See [config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml)
stream_plugins: []
# -- Customize APISIX proxy_cache plugin settings.
proxy_cache:
# -- Customize additional cache zones. See [proxy_cache plugin](https://apisix.apache.org/docs/apisix/plugins/proxy-cache/#enable-plugin)
zones: []

# -- Set APISIX plugin attributes, see [config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L376) for more details
pluginAttrs: {}
Expand Down