bitflicker64 commented on code in PR #3322:
URL: https://github.com/apache/hugegraph/pull/3322#discussion_r4267202016


##########
helm/hugegraph/templates/server-deployment.yaml:
##########
@@ -258,6 +258,14 @@ spec:
                   fieldPath: status.podIP
             - name: HG_SERVER_BACKEND
               value: {{ .Values.server.backend | quote }}
+            {{- if ne (.Values.server.serviceId | default "DEFAULT") "DEFAULT" 
}}
+            - name: HG_SERVER_SERVICE_ID

Review Comment:
   Minor: With an image whose entrypoint predates this PR, a non-default 
`server.serviceId` or `server.graphSpace` is silently ignored and the Server 
registers as DEFAULT.
   
   The chart only sets `HG_SERVER_SERVICE_ID` / `HG_SERVER_GRAPHSPACE` here and 
relies on the image entrypoint to write `server.service_id` and 
`server.graphspace`. The wrapper above (the `while read LINE` rewrite of 
`rest-server.properties`) does not touch either key, and `server.image.tag` can 
be pinned, as the README recommends for production. With a pinned pre-change 
tag and `--set-string server.serviceId=analytics`, the old entrypoint drops the 
variable, the Server joins the DEFAULT service, and `helm test` with the 
default alias still passes, so nothing reports the mismatch.
   
   Either fail at startup when `HG_SERVER_SERVICE_ID` or `HG_SERVER_GRAPHSPACE` 
is set to a non-default value and the image entrypoint has no mapping for it, 
or write both keys in the wrapper with the same escaping the entrypoint 
applies. A raw `printf '%s'`, as used for `server.urls_to_pd`, would 
mis-serialize IDs containing spaces, backslashes, `:` or `=`.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to