feat: apisix dashboard custom plugins configuration support (#651)
* feat: add support for plugins conf
* feat: add support for mounting custom schema.json
* docs: update apisix-dashboard docs
* docs: update README with helm-docs
* feat: only add plugins if the value is not empty
* style: fix trailing whitespace
* style: fix whitespace in docs
diff --git a/charts/apisix-dashboard/README.md b/charts/apisix-dashboard/README.md
index 25e5e03..80560b6 100644
--- a/charts/apisix-dashboard/README.md
+++ b/charts/apisix-dashboard/README.md
@@ -73,6 +73,8 @@
| config.conf.log.accessLog.filePath | string | `"/dev/stdout"` | Error log path |
| config.conf.log.errorLog | object | `{"filePath":"/dev/stderr","level":"warn"}` | Error log level. Supports levels, lower to higher: debug, info, warn, error, panic, fatal |
| config.conf.log.errorLog.filePath | string | `"/dev/stderr"` | Access log path |
+| config.conf.plugins | list | `[]` | Overrides plugins in the APISIX Dashboard conf |
+| config.schema.configMap | object | `{}` | Overrides APISIX Dashboard schema.json by mounting configMap containing schema.json |
| fullnameOverride | string | `""` | String to fully override apisix-dashboard.fullname template |
| image.pullPolicy | string | `"IfNotPresent"` | Apache APISIX Dashboard image pull policy |
| image.repository | string | `"apache/apisix-dashboard"` | Apache APISIX Dashboard image repository |
diff --git a/charts/apisix-dashboard/templates/configmap.yaml b/charts/apisix-dashboard/templates/configmap.yaml
index 82d6e8f..e551195 100644
--- a/charts/apisix-dashboard/templates/configmap.yaml
+++ b/charts/apisix-dashboard/templates/configmap.yaml
@@ -65,3 +65,9 @@
password: {{ .password }}
{{- end }}
{{- end }}
+ {{- with .Values.config.conf.plugins }}
+ plugins:
+ {{- range . }}
+ - {{ . }}
+ {{- end }}
+ {{- end }}
diff --git a/charts/apisix-dashboard/templates/deployment.yaml b/charts/apisix-dashboard/templates/deployment.yaml
index 98ccb11..3689d84 100644
--- a/charts/apisix-dashboard/templates/deployment.yaml
+++ b/charts/apisix-dashboard/templates/deployment.yaml
@@ -77,6 +77,11 @@
- mountPath: /usr/local/apisix-dashboard/conf/conf.yaml
name: apisix-dashboard-config
subPath: conf.yaml
+ {{- with .Values.config.schema.configMap }}
+ - mountPath: /usr/local/apisix-dashboard/conf/schema.json
+ name: schema-json
+ subPath: {{ .key }}
+ {{- end}}
{{- if .Values.config.conf.etcd.mtlsExistingSecret }}
- mountPath: /etc/etcd
name: etcd-config
@@ -85,6 +90,11 @@
- configMap:
name: {{ include "apisix-dashboard.fullname" . }}
name: apisix-dashboard-config
+ {{- with .Values.config.schema.configMap }}
+ - configMap:
+ name: {{ .name }}
+ name: schema-json
+ {{- end}}
{{- if .Values.config.conf.etcd.mtlsExistingSecret }}
- secret:
secretName: {{ .Values.config.conf.etcd.mtlsExistingSecret }}
diff --git a/charts/apisix-dashboard/values.yaml b/charts/apisix-dashboard/values.yaml
index 7d8234f..2f0d89b 100644
--- a/charts/apisix-dashboard/values.yaml
+++ b/charts/apisix-dashboard/values.yaml
@@ -71,6 +71,12 @@
# runAsUser: 1000
config:
+ schema:
+ # -- Overrides APISIX Dashboard schema.json
+ # by mounting configMap containing schema.json
+ configMap: {}
+ # name: apisix-dashboard-schema
+ # key: schema.json
conf:
listen:
# -- The address on which the Manager API should listen.
@@ -109,7 +115,8 @@
accessLog:
# -- Error log path
filePath: /dev/stdout
-
+ # -- Overrides plugins in the APISIX Dashboard conf
+ plugins: []
authentication:
# -- Secret for jwt token generation
secret: secret