bitflicker64 opened a new issue, #3286: URL: https://github.com/apache/hugegraph/issues/3286
### Feature Description (功能描述) The Server image entrypoint maps a set of environment variables onto the conf files ([`docker-entrypoint.sh:161-172`](https://github.com/apache/hugegraph/blob/d9abcd4317fb36128e7e4d209139ec7f3a28cdfc/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh#L161-L172)), but two keys a Server on PD needs in Kubernetes have no mapping: - `server.urls_to_pd`: the URL the Server registers with PD - `server.deploy_in_k8s` The Helm chart therefore wraps the entrypoint and rewrites `rest-server.properties` itself before `exec`ing it ([`server-deployment.yaml:161-232`](https://github.com/apache/hugegraph/blob/d9abcd4317fb36128e7e4d209139ec7f3a28cdfc/helm/hugegraph/templates/server-deployment.yaml#L161-L232)). The entrypoint also edits the conf files in place: `set_prop_encoded` runs `sed -ri` on the file under `conf/` ([`docker-entrypoint.sh:65-66`](https://github.com/apache/hugegraph/blob/d9abcd4317fb36128e7e4d209139ec7f3a28cdfc/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh#L65-L66)). The image's `conf/` must be writable, so the chart refuses `readOnlyRootFilesystem` for Server ([`_helpers.tpl:838-839`](https://github.com/apache/hugegraph/blob/d9abcd4317fb36128e7e4d209139ec7f3a28cdfc/helm/hugegraph/templates/_helpers.tpl#L838-L839)). Proposal: 1. Map `HG_SERVER_URLS_TO_PD` to `server.urls_to_pd` and `HG_SERVER_DEPLOY_IN_K8S` to `server.deploy_in_k8s`, next to the existing `HG_SERVER_*` mappings. 2. Render the effective conf into a writable directory (a copy of `conf/` under a data or temp path) and start the Server from it. The image's own `conf/` is then never modified, and `readOnlyRootFilesystem` becomes possible once #3211 (non-root image) also lands. #3253 makes the conf path overridable, which this step could build on. With both, the chart can drop its wrapper. The TODO at [`docker-entrypoint.sh:156`](https://github.com/apache/hugegraph/blob/d9abcd4317fb36128e7e4d209139ec7f3a28cdfc/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh#L156) (from #3260) points here. Not proposed for 1.8.0: the chart's wrapper covers it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
