Skip to content

Commit

Permalink
chore: provide meta.lua_shared_dict configuration for gateway (#144)
Browse files Browse the repository at this point in the history
Signed-off-by: Nic <qianyong@api7.ai>
  • Loading branch information
nic-6443 authored Sep 19, 2024
1 parent 6e57953 commit 06552f7
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.9
version: 0.1.10

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
2 changes: 1 addition & 1 deletion charts/gateway/README.md
Original file line number Diff line number Diff line change
@@ -82,7 +82,6 @@ The command removes all the Kubernetes components associated with the chart and
| apisix.http.luaSharedDict.plugin-limit-count | string | `"10m"` | |
| apisix.http.luaSharedDict.plugin-limit-count-redis-cluster-slot-lock | string | `"1m"` | |
| apisix.http.luaSharedDict.plugin-limit-req | string | `"10m"` | |
| apisix.http.luaSharedDict.prometheus-metrics | string | `"10m"` | |
| apisix.http.luaSharedDict.saml_sessions | string | `"10m"` | |
| apisix.http.luaSharedDict.tars | string | `"1m"` | |
| apisix.http.luaSharedDict.tracing_buffer | string | `"10m"` | |
@@ -100,6 +99,7 @@ The command removes all the Kubernetes components associated with the chart and
| apisix.luaModuleHook.configMapRef.name | string | `""` | Name of the ConfigMap where the lua module codes store |
| apisix.luaModuleHook.hookPoint | string | `""` | the hook module which will be used to inject third party code into APISIX use the lua require style like: "module.say_hello" |
| apisix.luaModuleHook.luaPath | string | `""` | extend lua_package_path to load third party code |
| apisix.meta.luaSharedDict.prometheus-metrics | string | `"15m"` | |
| apisix.nodeSelector | object | `{}` | Node labels for API7 Gateway pod assignment |
| apisix.podAnnotations | object | `{}` | Annotations to add to each pod |
| apisix.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":"90%"}` | See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details |
7 changes: 7 additions & 0 deletions charts/gateway/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -136,6 +136,13 @@ data:
- {{ $env }}
{{- end }}
{{- end }}
{{- if .Values.apisix.meta.luaSharedDict }}
meta:
lua_shared_dict:
{{- toYaml .Values.apisix.meta.luaSharedDict | nindent 10 }}
{{- end }}
stream:
{{- if .Values.apisix.stream.luaSharedDict }}
lua_shared_dict:
5 changes: 4 additions & 1 deletion charts/gateway/values.yaml
Original file line number Diff line number Diff line change
@@ -30,6 +30,10 @@ apisix:
# -- Use Pod metadata.uid as the APISIX id.
setIDFromPodUID: false

meta:
luaSharedDict:
prometheus-metrics: 15m

stream:
luaSharedDict:
etcd-cluster-health-check-stream: 10m
@@ -44,7 +48,6 @@ apisix:
internal-status: 10m
plugin-limit-req: 10m
plugin-limit-count: 10m
prometheus-metrics: 10m
plugin-limit-conn: 10m
plugin-graphql-limit-count: 10m
plugin-graphql-limit-count-reset-header: 10m

0 comments on commit 06552f7

Please sign in to comment.