Skip to content

feat(helm): cleanups for chart - #11268

Closed
markhoerth wants to merge 1 commit into
apache:mainfrom
markhoerth:feat/helm-chart-prod-ready
Closed

feat(helm): cleanups for chart#11268
markhoerth wants to merge 1 commit into
apache:mainfrom
markhoerth:feat/helm-chart-prod-ready

Conversation

@markhoerth

@markhoerth markhoerth commented May 27, 2026

Copy link
Copy Markdown
Collaborator

All items are small-scope, none depend on each other, and the bundle deliberately excludes the items tracked separately.

Items in scope

  • Item 2: Remove gravitino.datastrato.* property references from ci-values.yaml and the commented examples in values.yaml. Vendor-neutral example names used so the visibleConfigs mechanism remains documented and exercised in CI.
  • Item 3: Add structured values.yaml paths for entity.maxConnections, lock.maxNodes, and lock.minNodes. Properties used by the production sample in docs/gravitino-server-config.md#production that previously required additionalConfigItems workarounds. Emitted conditionally from the gravitino.conf template so server defaults apply when unset.
  • Item 5: Ship dev-values.yaml and prod-values.yaml scenario files derived from the development and production samples in gravitino-server-config.md. The prod scenario uses structured paths for the properties added by item 3 (no additionalConfigItems).
  • Item 6: Replace NOTES.txt with a post-install deployment summary that surfaces the actual backend, persistence, IRC, and auth configuration. Adds warnings for ephemeral H2 metadata, in-memory IRC backend, and simple-mode authentication.
  • Item 7: Remove testAdditionalConfigItems test-fixture properties from ci-values.yaml. Replaced with a realistic gravitino.eventListener.names example.
  • Item 8: Default-credential warnings above the mysql and postgresql sections in values.yaml. NOTES.txt fires runtime warnings when in-chart databases are enabled with default passwords.
  • Item 9: Emit dynamic-config-provider sub-properties (gravitino-uri, gravitino-metalake, default-catalog-name) conditionally, so unset values do not render as empty-string property assignments.

Items deliberately out of scope

  • Item 1 (Kubernetes Secret references for sensitive values): P0 blocker for some customers. Touches templates/deployment.yaml and flips SKIP_CONFIG_REWRITE. Tracked as a separate PR.
  • Item 4 (existingConfigMap support): Deferred. Niche GitOps unlock; no current customer pressure.
  • Item 10 (OIDC OAuth values schema): In progress on a separate branch.

Validation

  • helm lint clean against defaults and both new scenario files (dev-values.yaml, prod-values.yaml).
  • helm template renders expected gravitino.conf content for default, dev, and prod scenarios.
  • Item 3's structured paths verified: emit correctly when set (prod scenario produces gravitino.entity.store.relational.maxConnections = 200, gravitino.lock.maxNodes = 500000, gravitino.lock.minNodes = 5000), omit cleanly when unset.
  • Item 9's conditional emission verified: dev scenario produces a single gravitino.iceberg-rest.gravitino-metalake = test line with no empty gravitino-uri = or default-catalog-name = lines.
  • NOTES.txt warnings verified via helm install --dry-run for H2 ephemeral, IRC in-memory, simple auth, and default MySQL/PostgreSQL credentials.
  • Vendor branding and test-fixture cleanups verified: grep -r datastrato dev/charts/gravitino/ and grep -r testAdditionalConfigItems dev/charts/gravitino/ both return no results.
  • Prod scenario uses only structured paths: grep additionalConfigItems dev/charts/gravitino/resources/scenarios/prod-values.yaml returns no results.

Runtime validation

Runtime validation is blocked by #11267 (chart-vs-image path mismatch in all currently published Gravitino images). The chart hardcodes /opt/gravitino but published images (1.2.0 and 1.3.0-SNAPSHOT both verified) install Gravitino at /root/gravitino. A default helm install against main fails with CrashLoopBackOff identically to this branch, so the blocker is not introduced by this PR.

The path bug has a second layer where /root/ has 700 permissions incompatible with the chart's non-root container security context (runAsNonRoot: true, runAsUser: 1000). Any chart-side workaround requires disabling runAsNonRoot, which is a security regression unacceptable for enterprise deployments. This is why Option A in #11267 (move the image install location to /opt/gravitino) is the only viable resolution.

Once #11267 is resolved, this PR's edits will runtime-validate without modification since none of them touch the deployment template or path assumptions.

Documentation followup

Once this PR and the separate item 1 PR (Secret references) land, docs/chart.md can describe a complete install-to-production flow including the dev and prod scenario files. The scenario files in resources/scenarios/ are the canonical source the docs should link via raw GitHub URLs.

Bundles seven small-scope items from the chart enterprise readiness
audit. None depend on each other. Scope deliberately excludes item 1
(Secret references), item 4 (existingConfigMap), and item 10 (OAuth
schema), which are tracked separately.

Changes:

- (item 2) Remove gravitino.datastrato.* property references from
  ci-values.yaml and the commented examples in values.yaml. Replaced
  with vendor-neutral example property names so the visibleConfigs
  mechanism remains documented and exercised in CI.

- (item 3) Add structured values.yaml paths for entity.maxConnections,
  lock.maxNodes, and lock.minNodes. Properties used by the production
  sample in docs/gravitino-server-config.md#production that previously
  required additionalConfigItems workarounds. Emitted conditionally
  from the gravitino.conf template so server defaults apply when unset.

- (item 5) Ship dev-values.yaml and prod-values.yaml scenario files
  derived from the development and production samples in
  gravitino-server-config.md. The prod scenario uses structured paths
  for the properties added by item 3 (no additionalConfigItems).

- (item 6) Replace NOTES.txt with a post-install deployment summary
  that surfaces the actual backend, persistence, IRC, and auth
  configuration, plus warnings for ephemeral H2 metadata, in-memory
  IRC backend, and simple-mode authentication.

- (item 7) Remove testAdditionalConfigItems test-fixture properties
  from ci-values.yaml. Replaced with realistic eventListener example.

- (item 8) Add default-credential warnings above the mysql and
  postgresql sections in values.yaml. NOTES.txt fires runtime
  warnings when the in-chart databases are enabled with defaults.

- (item 9) Emit dynamic-config-provider sub-properties conditionally,
  so unset values do not render as empty-string property assignments
  in the rendered gravitino.conf.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
markhoerth pushed a commit to markhoerth/gravitino that referenced this pull request May 27, 2026
Rework the Kubernetes installation page to take advantage of the
Helm chart enhancements landing in apache/gravitino apache#11268: the new
dev-values.yaml and prod-values.yaml scenario files plus the
expanded structured values schema.

Chart Values section rewrite. The previous one-paragraph stub plus
a 'helm show values' command becomes a substantive foundation with
four subsections: Inspecting the Defaults, Customizing With a Values
File (using a small inline example), One-Off Overrides With --set
(with precedence note), and Example Scenario Files (forward-
referencing the scenarios shipped with the chart).

Two new Deployment subsections: 'Deploy With the Dev Scenario' and
'Deploy With the Production Scenario'. Each describes the
corresponding shipped scenario file, shows the helm pull --untar
extract-and-install workflow, and links to gravitino-server-config.md
for the equivalent gravitino.conf reference used by the binary
install path.

Two deletions for redundancy:

- 'Deploy with Custom Configuration' is subsumed by the new Chart
  Values section's --set and -f content.
- 'Deploy Gravitino Using an Existing MySQL Database' is subsumed by
  the production scenario, which covers external MySQL plus OIDC
  OAuth, cache tuning, audit, and tree lock configuration; the MySQL
  schema initialization prerequisite is referenced from the production
  scenario subsection and from prod-values.yaml's header comment.

Also removes the orphan generic 'helm upgrade --install [RELEASE_NAME]
... [flags]' template at the top of the Deployment section (no
concrete value, every following subsection shows a real invocation)
and the :::note admonition that lived inside the deleted MySQL
subsection.

The dev and production scenario files referenced from this page are
added by apache/gravitino apache#11268. That PR may merge after this docs
commit; once it does, the descriptions on this page match the shipped
files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Code Coverage Report

Overall Project 66.54% 🟢
Files changed No Java source files changed -

Module Coverage
aliyun 1.72% 🔴
api 46.82% 🟢
authorization-common 85.96% 🟢
aws 3.66% 🔴
azure 2.47% 🔴
catalog-common 10.04% 🔴
catalog-fileset 80.33% 🟢
catalog-glue 66.08% 🟢
catalog-hive 79.55% 🟢
catalog-jdbc-clickhouse 80.02% 🟢
catalog-jdbc-common 45.31% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.26% 🟢
catalog-jdbc-starrocks 78.51% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 44.89% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.65% 🟢
catalog-lakehouse-paimon 79.29% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.94% 🟢
common 49.99% 🟢
core 82.37% 🟢
filesystem-hadoop3 76.97% 🟢
flink 0.0% 🔴
flink-common 41.37% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 53.26% 🟢
iceberg-common 54.98% 🟢
iceberg-rest-server 69.99% 🟢
idp-basic 89.36% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.83% 🔴
lance-rest-server 60.27% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 85.1% 🟢
server-common 72.85% 🟢
spark 32.79% 🔴
spark-common 39.61% 🔴
trino-connector 39.44% 🔴

icebergRest:
catalogConfigProvider: dynamic-config-provider
dynamicConfigProvider:
metalake: test

@danhuawang danhuawang May 28, 2026

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.

Why not put this in the value.yaml if it's a recommended configuration?

@markhoerth markhoerth changed the title feat(helm): enterprise readiness cleanups for chart feat(helm): cleanups for chart May 28, 2026
@jerryshao

Copy link
Copy Markdown
Contributor

@danhuawang can you please help to continue to this PR? We want to get it merged in 1.3.0.

@danhuawang

Copy link
Copy Markdown
Contributor

@danhuawang can you please help to continue to this PR? We want to get it merged in 1.3.0.

ok.

@mchades

mchades commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

fixed by #11514

@mchades mchades closed this Jun 9, 2026
mchades pushed a commit that referenced this pull request Jun 10, 2026
… for chart (#11514)

### What changes were proposed in this pull request?

This PR includes the enterprise readiness cleanups for the Helm chart
(authored by @markhoerth) plus follow-up fixes for template correctness
and CI stability issues discovered during review.

**Commit 1 (by @markhoerth):** `feat(helm): enterprise readiness
cleanups for chart`
- Remove vendor-specific property references from ci-values.yaml and
values.yaml
- Add structured values.yaml paths for entity.maxConnections,
lock.maxNodes, and lock.minNodes
- Ship dev-values.yaml and prod-values.yaml scenario files
- Replace NOTES.txt with a post-install deployment summary with runtime
warnings
- Add default-credential warnings for mysql and postgresql sections
- Emit dynamic-config-provider sub-properties conditionally

**Commit 2 (follow-up fixes):**

1. **Conditional OAuth rendering** (`gravitino.conf`): Wrap all
`gravitino.authenticator.oauth.*` properties in `{{- if contains "oauth"
.Values.authenticators }}` with per-property guards. Previously these
properties were rendered unconditionally with empty values even in
simple-auth mode, overriding server defaults.

2. **Fix H2 backend detection** (`NOTES.txt`): Replace exact-match `eq
"jdbc:h2"` with `hasPrefix "jdbc:h2"` so H2 file-mode URLs are correctly
identified.

3. **Fix CI crash** (`ci-values.yaml`): Replace
`gravitino.eventListener.names: "audit,sync"` with
`gravitino.server.shutdown.timeout: "5000"`. The eventListener config
declared listeners without the required `.class` properties, causing
server startup failure.

4. **Document additionalConfigItems usage** (`values.yaml`): Add
complete commented example for event listener configuration.

5. **Migrate to non-deprecated entrypoint** (`values.yaml`,
`pg-values.yaml`): Replace `bin/start-gravitino.sh` with
`docker/docker-entrypoint.sh` to align with the Dockerfile ENTRYPOINT.

### Why are the changes needed?

- Empty OAuth properties override server defaults silently.
- The H2 detection bug suppresses the data-loss warning for H2 file-mode
URLs.
- The `eventListener.names` config without `class` properties crashes
the server during CI chart tests.
- The deprecated `start-gravitino.sh` generates unnecessary warning
noise and will break when removed.

Fix: #11268

### Does this PR introduce _any_ user-facing change?

- When `authenticators` is `simple` (default), `gravitino.conf` no
longer contains empty `gravitino.authenticator.oauth.*` lines.
- NOTES.txt correctly classifies H2 file-mode JDBC URLs as "Embedded
H2".
- The deprecation warning from `bin/start-gravitino.sh` no longer
appears in pod logs.

### How was this patch tested?

- Ran `helm template` with default values (simple auth) — no
`authenticator.oauth` lines emitted.
- Ran `helm template` with `prod-values.yaml` (oauth) — all configured
OAuth properties render correctly.
- Ran `helm template` with `ci-values.yaml` —
`gravitino.server.shutdown.timeout = 5000` renders in
additionalConfigItems section.
- All template renderings compile without errors.

---------

Co-authored-by: Mark Hoerth <mark@datastrato.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Qi Yu <yuqi@datastrato.com>
@mchades mchades added the 1.3.0 Release v1.3.0 label Jun 10, 2026
jerryshao pushed a commit that referenced this pull request Jun 11, 2026
…cleanups and follow-up fixes for chart (#11514) (#11564)

**Cherry-pick Information:**
- Original commit: 94d6045
- Target branch: `branch-1.3`
- Status: ✅ Clean cherry-pick (no conflicts)

Co-authored-by: Danhua Wang <danhua@datastrato.com>
Co-authored-by: Mark Hoerth <mark@datastrato.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Qi Yu <yuqi@datastrato.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.3.0 Release v1.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants