feat: allow setting server token from helm values (#349)
diff --git a/charts/apisix/README.md b/charts/apisix/README.md
index 8a1d91c..8a0a0b3 100644
--- a/charts/apisix/README.md
+++ b/charts/apisix/README.md
@@ -69,6 +69,7 @@
| `apisix.affinity` | Set affinity for Apache APISIX deploy | `{}` |
| `apisix.podAntiAffinity.enabled` | Enable or disable podAntiAffinity | `false` |
| `apisix.setIDFromPodUID` | Whether to use the Pod UID as the APISIX instance id, see [apache/apisix#5417](https://github.com/apache/apisix/issues/5417) to decide whether you should enable this setting) | `false` |
+| `apisix.enableServerTokens` | Set the `enable_server_tokens` (Whether the APISIX version number should be shown in Server header) | `Not Set` |
| `apisix.customLuaSharedDicts` | Add custom [lua_shared_dict](https://github.com/openresty/lua-nginx-module#toc88) settings, click [here](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml#L27-L30) to learn the format of a shared dict | `[]` |
| `apisix.pluginAttrs` | Set APISIX plugin attributes, see [config-default.yaml](https://github.com/apache/apisix/blob/master/conf/config-default.yaml#L376) for more details | `{}` |
| `apisix.luaModuleHook.enabled` | Whether to add a custom lua module | `false` |
diff --git a/charts/apisix/templates/configmap.yaml b/charts/apisix/templates/configmap.yaml
index c48d908..5a7904b 100644
--- a/charts/apisix/templates/configmap.yaml
+++ b/charts/apisix/templates/configmap.yaml
@@ -62,6 +62,7 @@
enable_dev_mode: false # Sets nginx worker_processes to 1 if set to true
enable_reuseport: true # Enable nginx SO_REUSEPORT switch if set to true.
enable_ipv6: {{ .Values.apisix.enableIPv6 }} # Enable nginx IPv6 resolver
+ enable_server_tokens: {{ .Values.apisix.enableServerTokens }} # Whether the APISIX version number should be shown in Server header
config_center: etcd # etcd: use etcd to store the config value
# yaml: fetch the config value from local yaml file `/your_path/conf/apisix.yaml`
diff --git a/charts/apisix/values.yaml b/charts/apisix/values.yaml
index ea89965..ca43061 100644
--- a/charts/apisix/values.yaml
+++ b/charts/apisix/values.yaml
@@ -25,6 +25,9 @@
# Enable nginx IPv6 resolver
enableIPv6: true
+ # Whether the APISIX version number should be shown in Server header
+ enableServerTokens: true
+
# Use Pod metadata.uid as the APISIX id.
setIDFromPodUID: false