Skip to content

feat(helm): support easy & strict mode for k8s deployment - #3338

Merged
imbajin merged 17 commits into
apache:masterfrom
hugegraph:codex/helm-easy-defaults
Oct 14, 2026
Merged

imbajin merged 17 commits into
apache:masterfrom
hugegraph:codex/helm-easy-defaults

Conversation

@imbajin

@imbajin imbajin commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Purpose of the PR

Make a fresh Helm installation straightforward on internal Kubernetes clusters. Previously, custom NodePorts and HTTP entrypoints required additional acknowledgements, the UI was disabled, and startup tools pulled a separate curl image. The default now installs the authenticated UI and API through automatic NodePorts, with persistent data and explicit component overrides.

Main Changes

  • Add easy/strict defaults, optional temporary storage, native Service/Ingress settings, and an internal image registry override.
  • Reuse Store/Server images for waiting and testing; coordinate configurable storage waits with startup probes and clarify PD credential errors.
  • Honor client response-compression preferences, including explicit gzip exclusion and valid trailing-dot quality factors; document PD REST credentials, manual leader balance and Store replacement behavior.
  • Shorten the README, fold uncommon settings, and provide complete internal-network, static-PV and GitOps examples. Existing releases retain their settings with --reuse-values.

Verifying these changes

  • Earlier local checks passed Helm lint, template/unit/package checks, Kubernetes 1.23 manifest validation and shell fixtures. Java 17 Maven reactor compilation and response-compression tests were rerun after merging current ASF master and pass.

No fresh cluster acceptance run was performed for this update. The independent cluster report covers the earlier branch head and identifies two intermittent first-query failures; these remain under investigation. Follow the README installation example with a provisioned StorageClass, or use the static-PV example. --set persistence.enabled=false selects disposable storage for a fresh test release.

Does this PR potentially affect the following parts?

  • Dependencies
  • Modify configurations
  • The public API
  • Other affects (default UI, network exposure and storage behavior)
  • Nope

Documentation Status

Documentation: helm/hugegraph/README.md, helm/hugegraph/docs/operations.md and helm/hugegraph/examples/.

Organization testing/review copy: hugegraph#309.

Conceptual overview

Helm fresh-install defaults, explicit overrides and existing-cluster upgrade boundaries

Conceptual illustration; not test or release-acceptance evidence.

- add easy and strict defaults with explicit overrides
- enable UI, NodePort and persistent storage by default
- reuse component images for startup and test tools
- support internal networking and storage examples
- coordinate startup waits and improve credential errors
- include initial probe delay in the startup budget
- preserve manifest headers during value resolution
- support older release values and legacy notes
- shorten the README and separate operations details
- inherit component pull policies for reused tool images
- keep explicit custom tool image behavior
- verify required tools in existing image contract CI
- document probe initial delay in startup budgets
- validate inline credentials only when they are used
- preserve existing Secret precedence
- cover disabled authentication with retained settings
- check the tail tool used by the Helm test hook
- keep value resolution outside the license comment
- verify only the tools each helper role requires
- document complete custom helper image contracts
- cover strict presets in packaged chart checks
- remove stale memory measurements from the preset
- describe exposure acknowledgement fields as legacy
- point scale guards to the current operations guide
- retain Store draining and PD membership guidance
- distinguish PD voting changes from Store draining
- retain existing membership validation behavior
- document remaining capacity checks before Store shrink
@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.00%. Comparing base (92af2f8) to head (7590fd1).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3338      +/-   ##
============================================
- Coverage     54.31%   53.00%   -1.31%     
+ Complexity     2250     2185      -65     
============================================
  Files           770      762       -8     
  Lines         67952    67726     -226     
  Branches       9213     9285      +72     
============================================
- Hits          36905    35896    -1009     
- Misses        27470    28324     +854     
+ Partials       3577     3506      -71     
Flag Coverage Δ
hstore 35.58% <51.35%> (?)
pd 49.19% <ø> (?)
server_memory 51.62% <100.00%> (?)
server_rocksdb 42.31% <51.35%> (?)
store 31.98% <ø> (?)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@imbajin
imbajin force-pushed the codex/helm-easy-defaults branch from 49613d9 to 1ae2922 Compare October 13, 2026 20:33

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two P2 documentation corrections for the paired Helm changes

Reviewed Server commit 1ae2922 and documentation commit 02383e93626a5a76ecd839bd717eee7a3ff242b8.

  1. Align the private-registry mirror inventory with the actual Server image. values.yaml uses server.image.repository=hugegraph/server, while the README, registry example and bilingual website inventory name hugegraph/hugegraph. Following that list would not mirror the image selected by the Server workload and inherited Helm test. Please make the repository names consistent and cover the documented inventory against the rendered images.

  2. Update the paired operations guide's procedure references. Doc #527 still directs operators to the chart README for the partition-sharding procedure, full per-group checks and recovery sequence, but those procedures are no longer in the rewritten README. The new operations document describes constraints rather than the promised complete sequence. Please link the actual supported instructions or explicitly state the current recovery limits; this does not imply restoring old commands without validating their safety.

Sources:

repository: hugegraph/server

`hugegraph/hugegraph`, `hugegraph/hubble`) at the configured tags or digests:

https://github.com/apache/hugegraph-doc/blob/02383e93626a5a76ecd839bd717eee7a3ff242b8/content/en/docs/quickstart/hugegraph/hugegraph-helm-operations.md#L87

These are independently cross-checked source/documentation findings. No live Kubernetes deployment or recovery test was performed in this review.

Only the cited documentation/configuration facts were rechecked after the latest update; this is not a full review of the rebased PR.

- align the mirror inventory with rendered images
- split startup watches and link current procedures
- document explicit legacy values for GitOps upgrades
- correct the storage wait fixture summary
- use the versioned directory produced by packaging
- avoid the failing extra Maven version query
- preserve distribution and native runtime validation
- keep multi-node presets consistent with easy defaults
- name missing ingress and discovery egress rules in notes
- explain legacy Hubble storage choices and metadata loss
- cover volume-less upgrades and native external entries

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: no. Score: 9.5/10 (10 - 0.5 for one Minor). Summary: Fresh installs get the new easy defaults as intended, and existing releases keep their exposure and Hubble settings under --reuse-values, as the PR body and the #309 discussion state. The remaining gap is that the upgrade output does not tell anyone that the defaults changed. Evidence: helm lint and the chart's helm unittest suite pass (35 suites, 287 tests); a helm-unittest upgrade probe with live pre-PR objects renders the NodePort Server and the added Hubble objects. Not approving because the PR is still a draft and no live cluster upgrade was run.

Checked and not repeated: strict mode with an exposed Server, PD or Ingress now prints a NetworkPolicy warning in NOTES.txt; the Server image name in the README and registry example now matches hugegraph/server.

Comment thread helm/hugegraph/templates/_helpers.tpl
- record service inheritance before resolving defaults
- show enabled inherited NodePort entries during upgrades
- preserve explicit entry types and fresh-install notes
- cover upgrade overrides and legacy saved values
- honor compression preferences and retain plain fallback
- cover gzip, identity, quality factors and response headers
- explain PD REST credentials and Store maintenance
- retain simple variable-based PD requests
- add interactive and private-file credential alternatives
- clarify history exposure and quote the Server URL
- use a separate RaftEngine fixture for each test
- preserve cached-read interaction assertions
- keep background singleton tasks away from test mocks

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Handle valid trailing-dot q-values before using negative values as the missing-token sentinel

At 93b848e, CompressInterceptor.java lines95–110 can select an encoding explicitly excluded by a valid Accept-Encoding header. The pinned Jersey3.0.3 HttpHeaderReader.readQualityFactor returns -2000 for both q=0. and q=1. (it leaves c as '.' in the no-fractional-digit branch). These forms are valid under RFC9110 §12.4.2. The new gzip>=0/identity>=0 tests treat this value as token absence.

Consequently, '*;q=1, gzip;q=0.' falls back to the wildcard and enables forbidden gzip. 'gzip;q=0.5, identity;q=1.' also enables gzip despite identity having higher preference. Please normalize or correctly parse these legal forms and add regression tests for explicit gzip exclusion and identity preference; relying on the parser's negative value as absence loses the explicit token semantics.

Evidence:

for (AcceptableToken token : HttpHeaderReader.readAcceptToken(accept)) {
if (GZIP.equalsIgnoreCase(token.getToken())) {
gzip = token.getQuality();
} else if ("*".equals(token.getToken())) {
wildcard = token.getQuality();
} else if ("identity".equalsIgnoreCase(token.getToken())) {
identity = token.getQuality();
}
}
} catch (ParseException e) {
return false;
}
int quality = gzip >= 0 ? gzip : wildcard;
// If no encoding is acceptable, retain the plain response (RFC 9110, 12.4.1).
// Rejecting it here could hide a POST that has already changed graph data.
return quality > 0 && quality >= identity;
; https://github.com/eclipse-ee4j/jersey/blob/3.0.3/core-common/src/main/java/org/glassfish/jersey/message/internal/HttpHeaderReader.java#L194-L205 ; https://www.rfc-editor.org/rfc/rfc9110.html#section-12.4.2 . This is independently cross-checked source analysis, not a live HTTP reproduction.

@imbajin
imbajin marked this pull request as ready for review October 14, 2026 17:21
- normalize legal empty-fraction q-values before Jersey parsing
- cover explicit exclusion, identity and wildcard preferences
- document quality-factor behavior in Helm operations
- incorporate current upstream runtime and CI changes
- preserve the reviewed gzip fix without source edits
- validate compression against the current master baseline
@imbajin

imbajin commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

Addressed the trailing-dot q-value finding in the updated branch.

Legal q=0. and q=1. are normalized before the existing Jersey parser runs. This preserves explicit gzip exclusion over * and honors a higher identity preference. Regression tests use real Jersey request headers and check response bytes, Content-Encoding, Content-Length and Vary, with malformed neighboring values retained as negative controls. No additional parser or dependency was introduced.

Local Java 17 reactor compilation and the compression tests pass after merging current ASF master; formatting also passes. Current-head CI has started and is still pending.

@imbajin imbajin changed the title feat(helm): simplify default deployment feat(helm): support easy & strict mode for k8s deployment Oct 14, 2026
@imbajin
imbajin merged commit 4b77b7b into apache:master Oct 14, 2026
18 of 19 checks passed
@imbajin
imbajin deleted the codex/helm-easy-defaults branch October 14, 2026 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants