apache / apache/apisix-helm-chart

`ConfigMap` cannot refresh by `subPath`

Open
#243 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go Template
Stars
289
Forks
282
Avg merge
15h 55m
Merged PRs (30d)
3

Description

en https://kubernetes.io/docs/concepts/storage/volumes/#configmap
> A container using a ConfigMap as a [subPath](https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath) volume mount will not receive ConfigMap updates.

Maybe remove `subPath` is better ? We can use `apisix reload` without restart deployments/pods ?

e.g. [configmap-reload](https://github.com/jimmidyson/configmap-reload) toolkit

> [configmap-reload](https://github.com/jimmidyson/configmap-reload) is a simple binary to trigger a reload when Kubernetes ConfigMaps are updated. It watches mounted volume dirs and notifies the target process that the config map has been changed. It currently only supports sending an HTTP request, but in future it is expected to support sending OS (e.g. SIGHUP) once Kubernetes supports pod PID namespaces.

中文 https://kubernetes.io/zh/docs/concepts/storage/volumes/#configmap

> 容器以 [subPath](https://kubernetes.io/zh/docs/concepts/storage/volumes/#using-subpath) 卷挂载方式使用 ConfigMap 时,将无法接收 ConfigMap 的更新。

或许应该去掉 `subPath` ? 这样如果修改 ConfigMap 后可以通过 `apisix reload` 命令热加载更新,而不需要重启 apisix 服务?

例如 [configmap-reload](https://github.com/jimmidyson/configmap-reload) 小工具

> [configmap-reload](https://github.com/jimmidyson/configmap-reload) 是一个简单的二进制文件,用于在 Kubernetes ConfigMap 更新时触发重新加载。它监视挂载的卷目录并通知目标进程配置映射已更改。它目前只支持发送一个 HTTP 请求,但未来一旦 Kubernetes 支持 pod PID 命名空间,它有望支持发送 OS(例如 SIGHUP)。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the Apache APISIX Helm chart configuration that mounts ConfigMaps using subPath, then review the Kubernetes ConfigMap volume behavior described in the issue. Compare removing subPath with using configmap-reload and apisix reload; done means defining and validating a way for ConfigMap changes to reach APISIX without restarting deployments or pods.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, kubernetes
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.