Repository navigation
feat(k8s): make app-tier object storage configurable via storage.s3 - #5932
Merged
Merged
Conversation
Route the file-service and workflow-computing-unit-manager S3 access (endpoint + credentials) through a new `storage.s3` values block instead of hardcoding the in-cluster MinIO Service/Secret. When storage.s3.endpoint is empty the helpers fall back to the in-cluster MinIO, so the default install is unchanged (no-op render). Setting storage.s3.endpoint + credentials points those services at an external S3-compatible store; a `<release>-s3-credentials` Secret is generated from the inline keys unless storage.s3.existingSecret is provided. LakeFS/Lakekeeper storage and the minio.enabled off-switch are intentionally left for the next step. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
Automated Reviewer SuggestionsBased on the
|
bobbai00
requested changes
Jun 26, 2026
bobbai00
left a comment
Contributor
There was a problem hiding this comment.
Left a comment for clarification
Ma77Ball
approved these changes
Jul 1, 2026
Ma77Ball
left a comment
Contributor
There was a problem hiding this comment.
Overall LGTM! I left a small suggestion about the comment being out of scope and to fix below.
aicam
enabled auto-merge
July 1, 2026 18:22
mengw15
approved these changes
Jul 1, 2026
mengw15
left a comment
Contributor
There was a problem hiding this comment.
LGTM, left one observation on credential handling
Contributor
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bobbai00
approved these changes
Jul 1, 2026
2 of 6 tasks
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 1, 2026
This was referenced Jul 9, 2026
PG1204
pushed a commit
to PG1204/texera
that referenced
this pull request
Jul 14, 2026
…e#6295) ### What changes were proposed in this PR? This completes the "make object storage pluggable" work by wiring the **data tier** (LakeFS blockstore + Lakekeeper Iceberg warehouse) to an external S3 store and adding a single switch to drop the in-cluster MinIO entirely. apache#5932 did the **application tier** (`storage.s3`) and explicitly deferred this half. It is **non-breaking**: the default (on-prem / in-cluster MinIO) install renders the same set of resources. - **`minio.enabled` switch** (`values.yaml`, default `true`) to turn off the bundled MinIO subchart and point everything at external S3: - `Chart.yaml` -- the `minio` dependency gets `condition: minio.enabled`. - `templates/on-prem/minio-persistence.yaml` -- the MinIO PV/PVC is gated on `minio.enabled` as well as `minio.persistence.enabled`. - `templates/base/external-names/external-names.yaml` -- the `<release>-minio` `ExternalName` alias (exposed to the computing-unit-pool namespace) is only rendered when MinIO is enabled; with external S3 the CU pods reach the store directly via `STORAGE_S3_ENDPOINT`. - **Lakekeeper init job** (`templates/base/lakekeeper/lakekeeper-init-job.yaml`): - `STORAGE_S3_*` env now resolves through the shared `texera.s3.*` helpers introduced in apache#5932 (endpoint + credentials Secret name/keys) instead of hardcoding `<release>-minio`. - New `lakekeeperInit.createBucket` (default `true`) -- when `false`, the job skips `mc mb` and logs that it is using a pre-existing external bucket. Needed because an external bucket already exists and its IAM principal may lack `s3:CreateBucket`. - New `lakekeeperInit.warehouse.flavor` -- `s3-compat` (MinIO/other; emits `endpoint` + `path-style-access: true`) or native `aws` (real AWS S3; omits both). New optional `lakekeeperInit.warehouse.keyPrefix` to isolate the warehouse within a shared bucket. - **`values.yaml`** -- documents `minio.enabled`, the LakeFS external-blockstore override path, and the new `lakekeeperInit` keys. - **`values-aws.yaml`** (new) -- a complete, copy-pasteable all-external-S3 overlay: MinIO off, `storage.s3` (endpoint/region/credentials or `existingSecret`), LakeFS region-only S3 blockstore with credentials injected via `extraEnvVars`, and Lakekeeper `flavor: aws` + `createBucket: false`. How it behaves: - **Default (no config):** LakeFS and Lakekeeper use the in-cluster MinIO exactly as before; the MinIO subchart, PV/PVC, and `ExternalName` all render as today. - **External S3 (`-f values-aws.yaml`):** no MinIO is deployed; the app tier, LakeFS, and Lakekeeper all target the external S3 buckets, and the Lakekeeper warehouse is registered with the native AWS flavor against a pre-existing bucket. ### Any related issues, documentation, discussions? Closes apache#6294 (LakeFS blockstore + Lakekeeper warehouse external-S3 task). Part of apache#5891 -- unify AWS (EKS) and on-premise Kubernetes deployment under `bin/k8s` (parent feature). Follows apache#5932 (app-tier `storage.s3`) and apache#5757 (Helm template reorg). ### How was this PR tested? **1. Render parity (default install unchanged).** `helm template texera bin/k8s` on this branch vs on `main` renders the same set of resources; `helm lint bin/k8s` passes. The new `{{- if }}` guards (MinIO ExternalName, persistence, createBucket, flavor) all evaluate to their prior behavior when `minio.enabled`/`createBucket` default to `true`. **2. External-S3 render.** `helm template texera bin/k8s -f bin/k8s/values-aws.yaml` deploys no MinIO subchart / PV / PVC / ExternalName, routes the Lakekeeper init job's `STORAGE_S3_*` at the external endpoint and credentials Secret, skips the `mc mb` bucket-creation step, and registers the warehouse storage profile with `"flavor": "aws"` (no `endpoint` / `path-style-access`). `helm lint` passes for this value set. **3. End-to-end on a live EKS cluster with real AWS S3.** Stood up an isolated EKS cluster (`us-west-2`, its own AWS account, no MinIO) plus two pre-created S3 buckets (LakeFS blockstore + Iceberg warehouse) and an IAM user scoped to just those buckets with **no** `CreateBucket` permission. Built all Texera service images from this branch, deployed the chart with an external-S3 overlay derived from `values-aws.yaml`, and exercised the full stack: - LakeFS + Lakekeeper init jobs authenticated to external S3 and initialized (Lakekeeper `aws` flavor, bucket-creation skipped against the pre-existing warehouse bucket). - Created a dataset -> objects written to the external LakeFS bucket; dataset preview served via presigned S3 URLs (external buckets need a CORS rule, noted below). - Ran a workflow (CSV file scan) end to end -> **success, 100 rows returned**, with the Iceberg result table physically materialized in the external warehouse bucket (`metadata.json` + data objects confirmed via the S3 API). This exercises the full external-S3 path: file-service reads the CSV from LakeFS -> S3, the computing-unit pod reaches the Lakekeeper REST catalog, and results are written to Iceberg -> S3 and read back. All test AWS resources (cluster, buckets, IAM user) were torn down afterward. Operational note surfaced by the live test (not a chart defect, worth documenting): with a real external S3 store, dataset preview requires a CORS rule on the buckets (`GET`/`HEAD`) because the presigned URLs are served cross-origin from `*.s3.<region>.amazonaws.com`, whereas the in-cluster MinIO was same-origin. No unit tests were added -- the change is limited to Helm chart values/templates, validated by the render diff, `helm lint`, and the live end-to-end run above. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.8) --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
juliethecao
pushed a commit
to ELin2025/texera
that referenced
this pull request
Jul 17, 2026
…apache#6472) ### What changes were proposed in this PR? A small, behavior-preserving refactor of the Helm chart layout under `bin/k8s`. The agent-service **`BackendTrafficPolicy`** is a gateway-layer [Envoy Gateway](https://gateway.envoyproxy.io/) resource — it configures consistent-hash load balancing on the gateway for the agent-service `HTTPRoute` (so all requests for a given workflow pin to the same replica). Despite being a gateway concern, it was living under `templates/base/agent-service/` next to the app-tier `Deployment`/`Service`/`Secret`. It is the same class of resource as the `SecurityPolicy` (`gateway-security-policy.yaml`) that already lives in `templates/base/gateway/`, so this PR moves it there and renames it to the folder's `gateway-*` convention: ``` templates/base/agent-service/agent-service-backend-traffic-policy.yaml -> templates/base/gateway/gateway-agent-traffic-policy.yaml ``` After this move, **every** gateway-related resource (`GatewayClass`, `Gateway`, `HTTPRoute`, `Backend`, `SecurityPolicy`, `BackendTrafficPolicy`) lives under `templates/base/gateway/`, and no gateway resource remains scattered in a service folder (verified by grepping all templates for the `gateway.envoyproxy.io` / `gateway.networking.k8s.io` API groups — this was the only stray one). This is purely organizational: no values, resource names, gating conditions, or rendered output change. It continues the `base`/`aws`/`on-prem` template reorganization from apache#5757. ### Any related issues, documentation, discussions? Part of the deployment-unification effort tracked in apache#5891 (housekeeping follow-up to the template reorg in apache#5757). No functional dependency on the object-storage work (apache#5932, apache#6295). ### How was this PR tested? Verified the move is byte-for-byte behavior-preserving by diffing the rendered manifests before and after: ```bash cd bin/k8s helm dependency build # fetch subcharts # render with the file in its OLD location helm template test . > /tmp/before.txt # render with the file in its NEW location (this PR) helm template test . > /tmp/after.txt diff /tmp/before.txt /tmp/after.txt ``` The only differences are: 1. The `# Source:` provenance comment path (`.../agent-service/...` → `.../gateway/...`) — expected, cosmetic. 2. The auto-generated `encryptionKey` value — Helm regenerates this random secret on every invocation; unrelated to this change. The `BackendTrafficPolicy` resource itself (name `<release>-agent-service-traffic-policy`, its `targetRefs`, and the `X-Agent-Workflow-Id` consistent-hash config) renders identically. `helm template` succeeds for the default value set. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.8) Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This was referenced Nov 24, 2026
renovate-bot
pushed a commit
to renovate-bot/apache-_-texera
that referenced
this pull request
Nov 25, 2026
) ### What changes were proposed in this PR? Remove unused imports, bindings, helpers and fields, and settings that repeat a default or another entry, from the Amber Python runtime, the Python test resources of the workflow compiler and operators, the `bin/` licensing, local-dev and observability scripts, repository configuration, and three GitHub workflows (**+102/-172 lines**). There is no behavior change. - **Amber Python runtime:** `StatisticsManager` uses `defaultdict` instead of the deprecated `typing.DefaultDict`, and `BroadcastPartitioner` builds its batch with `[]`. `LargeBinaryOutputStream` raises and documents `OSError` (which `IOError` aliases), wraps its best-effort cleanup delete in `contextlib.suppress`, and drops the `pass` after `flush`'s docstring. - **Operator verification test resources:** `py_op_driver.py` drops ten `pytexera` imports and `RAW_TYPE_MAPPING` that it never reads. User code runs in its own namespace seeded by `from pytexera import *`, so the "used dynamically" note on those imports did not hold. `compare.py` drops the uncalled `_string_columns` helper and two dict copies of `double_kinds_a`/`double_kinds_e`, and `hf_parse_probe.py` drops unused `io` and `re` imports. Quoted annotations, `open(..., "r")`, `startswith` plus a slice, and a placeholder-free f-string take their plain forms here and in `standalone_worker.py`, `py_compile_worker.py` and `hf_binary_value_probe.py`. - **`bin/` scripts:** the licensing tools use a tuple `startswith`, read the one regex group they need instead of unpacking all four, print plain strings where f-strings had no placeholders, return a `bool` expression directly, drop annotation quotes under `from __future__ import annotations`, use `removesuffix`, and name unused loop values `_`. Two licensing tests drop `# noqa: E402` comments that suppress nothing under Ruff, and `test_local_dev_tui.py` drops the never-passed `version` parameter of `_seed_jvm_layout` together with the docstring sentence about a jar it never wrote. `bin/observability/smoke_test.py` stops returning an unread status from `_post`, builds the trace id from one `uuid4().hex` (the first 32 hex digits of two concatenated ones were always the first), and drops a `leaked = False` that both branches of the following `try` overwrite. - **Repository configuration:** `amber/pyproject.toml` drops `line-length = 88` and `max-complexity = 10`, which are Ruff's defaults (and `C901` is not selected). `.dockerignore` drops a root `user-resources/` entry that its first rule, `**/user-resources/`, already covers. `bin/fix-format.sh` drops the `""` case that `TARGET="${1:-all}"` makes unreachable, and `bin/frontend-proto-gen.sh` drops a `--proto_path` that repeats its `-I`. `bin/k8s/templates/aws/.gitkeep` goes, since the folder holds `s3-credentials-secret.yaml`. `bin/y-websocket-server/package.json` drops npm-init's `main` and placeholder `test` script (the image runs `npx y-websocket`), and a `bin/observability/docker-compose.yml` comment stops pointing at a `start_app.sh` that the repository does not have. - **GitHub workflows:** `comment-commands.yml` drops `github.event_name == 'issue_comment' && github.event.action == 'created'` from three job conditions, because the workflow only runs on `issue_comment: [created]`. `pr-assignment.yml` drops a `|| ''` that follows a `typeof ... === 'string'` guard. `benchmarks-pr-comment.yml` stops storing per-benchmark commit and date, a sample count and delta labels that nothing reads, takes each row's status from the deltas it already computed instead of a second `deltaInfo` pass, reuses each metric's 7-day delta, and builds the PR-only CSV table only when there is no comparison to show. | Event | PR / Commit | | --- | --- | | Introduced by | Amber Python runtime: apache#1891 (2023-05-01), apache#3262 (2025-02-18), apache#4100 (2025-12-15), apache#4707 (2026-05-03), apache#5249 (2026-06-06), apache#8260 (2026-11-18); test resources: apache#7207 (2026-08-14), apache#8617 (2026-10-15), apache#9306 (2026-11-10), apache#8357 (2026-11-17), apache#8358 (2026-11-18), apache#8359 (2026-11-19); `bin/` scripts: apache#4387 (2026-04-29), apache#4668 (2026-05-02), apache#4693 (2026-05-02), apache#4711 (2026-05-03), apache#5057 (2026-05-15), apache#5417 (2026-06-10), apache#5961 (2026-06-28), apache#5377 (2026-10-28); configuration: apache#3019 (2024-11-20), apache#3335 (2025-03-23), apache#3441 (2025-05-19), apache#3890 (2025-10-14), apache#4005 (2025-10-29), apache#4105 (2025-12-05), apache#5757 (2026-06-24); workflows: apache#4885 (2026-05-03), apache#4986 (2026-05-08), apache#5148 (2026-05-22), apache#5557 (2026-06-11), apache#5639 (2026-06-12) | | Usage removed by | `issue_comment` checks: apache#4899 (2026-05-04, `ci: drop the triage label, use is:open no:assignee filter`) moved `/take` out of `issue-triage.yml`, which also ran on `issues` events, into a workflow that only runs on created comments, and apache#4986 and apache#5148 copied the checks into two new jobs; `aws/.gitkeep`: apache#5932 (2026-07-01, `feat(k8s): make app-tier object storage configurable via storage.s3`) added the folder's first template; PR-only CSV table: apache#5639 (2026-06-12, `ci: compare benchmark PRs with main`) shows it only when there is no comparison; everything else: unused or redundant since introduction | As of 2026-11-23, the unread test-resource code is under a week old, the `.gitkeep` placeholder and the unread benchmark fields have been redundant for about 5 months, the `issue_comment` checks for over 6 months, and the duplicate `.dockerignore` entry and `--proto_path` for 20 and 24 months. ### Any related issues, documentation, discussions? Closes apache#9676. ### How was this PR tested? Ran on `525f8ce3fb` and on `main` at `89a492f97e` (Windows 11, Python 3.12 with CI's pinned `ruff` 0.14.7, `pytest` 9.0.3 and `textual` 8.2.8, JDK 17): ```bash cd amber ruff check src/main/python src/test/python ruff format --check src/main/python src/test/python pytest -m "not integration" cd .. ruff check $(git diff --name-only origin/main -- '*.py' ':!amber/') python -m pytest bin/ -v --tb=short sbt "WorkflowCompilingService/testOnly org.apache.texera.amber.translator.verify.ComparatorSpec org.apache.texera.amber.translator.verify.HarnessSpec org.apache.texera.amber.translator.verify.PyOpExecHarnessSpec org.apache.texera.amber.translator.verify.VisualizationJsonComparatorSpec" sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.huggingFace.codegen.HuggingFaceBinaryValueBehaviorSpec org.apache.texera.amber.operator.huggingFace.codegen.HuggingFaceParseBehaviorSpec org.apache.texera.amber.util.PythonCodeRawInvalidTextSpec" ``` - Ruff: passed on `amber/` (218 files already formatted) and on the 14 changed Python files outside `amber/`. - `pytest -m "not integration"` in `amber/` (JUnit XML): each of the 1,524 tests has the same outcome as on `main`: 1,496 passed, 10 skipped, and the same 18 platform-dependent tests (Iceberg catalog on PostgreSQL and `s3fs`, time zones, object reprs) fail on this Windows machine on both. - `python -m pytest bin/` (JUnit XML): each of the 196 tests has the same outcome as on `main`: 186 passed, and nine `bin/mounter` tests plus `test_stamp_dir_for_matches_shell_sha1`, which assume POSIX paths and shells, fail on Windows on both. - sbt (JUnit XML, `UDF_PYTHON_PATH` set to Python 3.12 because Windows has no `python3`): these seven suites load the edited test resources. `WorkflowCompilingService` passed 52 of 52 in 4 suites and `WorkflowOperator` 11 of 11 in 3 suites, with 0 canceled, the same as on `main`. - Licensing scripts: `concat_license_binary.py` writes byte-identical combined licenses for the Python and frontend images, and `check_binary_deps.py jar` prints byte-identical reports and exit codes for a synthetic lib folder with missing, extra and version-mismatched jars, with and without `--ignore-transitive-version`. - Workflows: the three edited workflows run only from the default branch (`issue_comment`, `pull_request_target` and `workflow_run`), so this PR's CI cannot run them. Each edited `github-script` body ran before and after under Node with recording stubs for `github`, `core`, `fs` and `fetch`, over 496 fixtures (missing or malformed CSV and baseline data, failed API calls, body edits with and without closing references). Every API call, comment body and log line is identical, and a one-line change to each script does show up in its traces. The `comment-commands.yml` conditions differ from `main` only by the two removed checks. - `bash -n` passes on `bin/fix-format.sh` and `bin/frontend-proto-gen.sh`, and the edited YAML, TOML and JSON files parse. - After review, `f84888ca6c` changes only three docstrings in `large_binary_output_stream.py` and inlines one local in `py_op_driver.py`. On it, Ruff passes as above, each of the 1,524 `amber` tests again has the same outcome as on `main`, the four `WorkflowCompilingService` suites pass 52 of 52, and `_jsonify` returns the same strings as on `525f8ce3fb` for seven `BINARY` inputs, with and without the pickle marker. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5.5)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
This makes the application tier's object-storage target configurable, as the first step toward supporting an external S3 store alongside the in-cluster MinIO. It is non-breaking: the default (on-prem / in-cluster MinIO) install renders an identical set of resources.
Today
file-serviceandworkflow-computing-unit-managerhardcode the S3 endpoint and credentials to the in-cluster MinIO Service ({{ .Release.Name }}-minio) and its auto-generated Secret. This PR routes both through a newstorage.s3values block:values.yaml— newstorage.s3block:endpoint,region,existingSecret,accessKeyId,secretAccessKey. All default to empty.templates/base/_helpers.tpl(new) — helpers that resolve the S3 endpoint and the credentials Secret name/keys. Whenstorage.s3.endpointis empty they fall back to the in-cluster MinIO Service and its{{ .Release.Name }}-minioSecret (keysroot-user/root-password), so the default render is unchanged.templates/aws/s3-credentials-secret.yaml(new) — a{{ .Release.Name }}-s3-credentialsSecret, rendered only when an externalendpointis set and noexistingSecretis supplied. Renders nothing on the default install.file-service/workflow-computing-unit-managerdeployments — theSTORAGE_S3_*env now comes from the helpers;STORAGE_S3_REGIONis added only in external mode.How it behaves:
storage.s3.endpoint+region+ credentials (orexistingSecret) → both services use that store; the chart materializes the credentials Secret unless you bring your own.Out of scope (intentionally deferred to keep this PR small and atomic): LakeFS blockstore + Lakekeeper warehouse external-S3 wiring, the
minio.enabledswitch to drop the in-cluster MinIO entirely, and avalues-aws.yamlexample overlay. Those are the LakeFS/Lakekeeper half of "make object storage pluggable" and will land as a follow-up.Any related issues, documentation, discussions?
Closes #5931 (app-tier
storage.s3task).Part of #5891 — unify AWS (EKS) and on-premise Kubernetes deployment under
bin/k8s(parent feature).Follows #5757 (Helm template reorg) and the design discussion in #5641.
How was this PR tested?
Verified the default install is unchanged and the external path renders correctly:
helm template texera bin/k8son this branch vs onmainrenders the same 102 resources — identical after ignoring comments. The only textual artifact is one empty---document from the gated-offs3-credentials-secret.yaml(its# licenseheader is emitted by Helm even though the{{- if }}body is empty); it produces no Kubernetes object.helm lintpasses.helm template ... --set storage.s3.endpoint=https://s3.us-west-2.amazonaws.com --set storage.s3.accessKeyId=… --set storage.s3.secretAccessKey=…renders the*-s3-credentialsSecret, repoints both deployments'STORAGE_S3_ENDPOINT/credentials at it (keysaccess-key-id/secret-access-key), and addsSTORAGE_S3_REGION.--set storage.s3.existingSecret=my-creds, the deployments referencemy-credsand the chart generates no Secret.helm lint bin/k8spasses for both the default and the external value sets.helm installlocally with Minikube and test creating dataset and running workflowsNo unit tests were added — the change is limited to Helm chart values/templates, validated by the render diff and
helm lintabove.Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 4.8)