bitflicker64 commented on code in PR #3322:
URL: https://github.com/apache/hugegraph/pull/3322#discussion_r4252977185
##########
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
+ value: {{ .Values.server.serviceId | replace "$" "$$" | quote }}
+ {{- end }}
+ {{- if ne (.Values.server.graphSpace | default "DEFAULT")
"DEFAULT" }}
+ - name: HG_SERVER_GRAPHSPACE
+ value: {{ .Values.server.graphSpace | quote }}
Review Comment:
Important: setting `server.graphSpace` to anything other than `DEFAULT`
makes the chart's `helm test` fail on a healthy release.
`templates/tests/test-connection.yaml` line 77 sends Gremlin with
`"aliases":{"graph":"DEFAULT-hugegraph"}` to every Server Pod and passes only
when each one answers 200. A Server whose `server.graphspace` is not `DEFAULT`
skips every graph outside its own space: `GraphManager.loadGraphsFromMeta` and
`loadGraph` call `filterLoadGraphByServiceGraphSpace`, which discards the key
`DEFAULT-hugegraph` when `serviceGraphSpace` is `team_a`, and `graph()` returns
null for a foreign space. So with `--set-string server.graphSpace=team_a` no
Pod binds `DEFAULT-hugegraph`, every Pod answers `Could not rebind`, and the
hook exits 1 after its 150 s deadline. The README then tells the operator to
delete Pods that answer `Could not rebind`, which does not help here. This is
read from the code, not run on a cluster.
Requested change: make the test hook follow the identity. For example, add a
value for the graph alias the hook queries (default `DEFAULT-hugegraph`) and
require or derive a graph in the selected space when `server.graphSpace` is not
`DEFAULT`, or skip the graph-bound Gremlin sweep in that case and say so in the
hook output. Please also add a sentence to the new "Server service identity"
README section and a `helm-unittest` case for the hook with a non-default graph
space.
--
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]