You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Server image: map server.urls_to_pd and server.deploy_in_k8s from the environment, and stop editing conf files in place #3286
The Server image entrypoint maps a set of environment variables onto the conf files (docker-entrypoint.sh:161-172), 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 execing it (server-deployment.yaml:161-232).
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). The image's conf/ must be writable, so the chart refuses readOnlyRootFilesystem for Server (_helpers.tpl:838-839).
Proposal:
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.
Feature Description (功能描述)
The Server image entrypoint maps a set of environment variables onto the conf files (
docker-entrypoint.sh:161-172), but two keys a Server on PD needs in Kubernetes have no mapping:server.urls_to_pd: the URL the Server registers with PDserver.deploy_in_k8sThe Helm chart therefore wraps the entrypoint and rewrites
rest-server.propertiesitself beforeexecing it (server-deployment.yaml:161-232).The entrypoint also edits the conf files in place:
set_prop_encodedrunssed -rion the file underconf/(docker-entrypoint.sh:65-66). The image'sconf/must be writable, so the chart refusesreadOnlyRootFilesystemfor Server (_helpers.tpl:838-839).Proposal:
HG_SERVER_URLS_TO_PDtoserver.urls_to_pdandHG_SERVER_DEPLOY_IN_K8Stoserver.deploy_in_k8s, next to the existingHG_SERVER_*mappings.conf/under a data or temp path) and start the Server from it. The image's ownconf/is then never modified, andreadOnlyRootFilesystembecomes possible once [Feature] Run the PD, Store and Server images as a non-root user #3211 (non-root image) also lands. feat(dist): Make conf/logs/plugins/pid paths overridable and fix log4j2 config resolution #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(from #3260) points here.Not proposed for 1.8.0: the chart's wrapper covers it.