Commit 11e5526
refactor: extract dereference/validate pipeline from reconcile_hive (#707)
* refactor: extract dereference/validate pipeline from reconcile_hive
Move external resource resolution (product image, S3 connection, metadata
database, OPA config) into controller::dereference module with its own
error enum. Extract config validation and merging into validate_cluster(),
which produces a ValidatedHiveCluster proving all product-config validation
succeeded before any Kubernetes resources are created.
The validated struct owns the resolved product image and per-role/
per-rolegroup merged configs. Existing build functions are unchanged
and receive their parameters from the validated structs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: extract validate_cluster into controller::validate module
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: align error variant naming with airflow and hbase operators
Rename FailedToResolveResourceConfig to FailedToResolveConfig and
fix OPA error display string to match the convention used across
all three dereference/validate extraction PRs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: move product image resolution from dereference to validate
Image resolution is a pure computation, not an I/O dereference, so it
belongs in validate_cluster alongside the other config validation. This
aligns with the pattern used by the trino and airflow operators.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* changelog
* Update rust/operator-binary/src/controller.rs
Co-authored-by: Siegfried Weber <mail@siegfriedweber.net>
* assume single role in ValidatedHiveCluster
* move db connection details from dereferenced to the controller and remove derives where they do not exist on the upstream type
* move validated cluster to the controller which will be the central dependency for subsequent steps
* replace parameter with constant
* replace parameter with compile-time value; rename function
* pass dereferenced fields through to validation
* extend assert step to increase test coverage by checking most generated resources
* remove securityContext from assert (might not work on Openshift)
* nix update
* pass dereferenced struct rather than each field
* remove timestmap from assert
* move related structs togetherin controller
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Siegfried Weber <mail@siegfriedweber.net>1 parent e63b953 commit 11e5526
8 files changed
Lines changed: 802 additions & 174 deletions
File tree
- rust/operator-binary/src
- controller
- crd
- tests/templates/kuttl/smoke
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments