Skip to content

feat: add opt-in declarative products to the shared operator runtime - #528

Open
hossain-rayhan wants to merge 10 commits into
documentdb:mainfrom
hossain-rayhan:rhossain/declarative-product-runtime
Open

hossain-rayhan wants to merge 10 commits into
documentdb:mainfrom
hossain-rayhan:rhossain/declarative-product-runtime

Conversation

@hossain-rayhan

@hossain-rayhan hossain-rayhan commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add an opt-in declarative product-definition path to the existing shared
operator. A distribution can package a definition with the common manager
instead of maintaining another Go API, adapter, controller, admission handler
and manager entrypoint.

The existing DocumentDB API, chart and no-definition startup remain the default.
Existing installations do not need a product-definition file or changed values.

Changes

  • --product-definition strictly loads and validates the administrative JSON
    contract; --check-product-definition validates it without Kubernetes.
  • Bind the same shared API types/schema and adapter mapping to a selected
    group/version/kind. Pass that configured adapter through the existing
    certificate, cluster, backup, scheduled-backup, PV and admission registrations.
  • Configure profile/images, PostgreSQL defaults, topology policy and endpoint
    formatting as data, not product-specific callbacks.
  • Preserve the existing default replication hooks, image resolution, extension
    version convention, admission behavior and combined-image fallback when no
    definition is selected.
  • Add an experimental generic Helm chart using canonical API schemas. Rendering
    changes API identity and removes the legacy PostgreSQL image default so omitted
    image overrides inherit the definition. Semver definitions also receive a
    schemaVersion pattern supporting prerelease/build targets. Other constraints stay shared;
    no per-product maintained schema or generated Go API.
    make manifests synchronizes these copies, and a drift test runs even without
    Helm installed. CRDs are retained on uninstall.
  • Keep non-upgrading opaque catalog pins and co-located scheduling explicitly
    local-development-only. Validate definition-image version guards without
    inventing semantic catalog versions.

The synthetic widget.example.io fixture demonstrates the contract without
adding another actual product implementation. Some shared Go/JSON names retain
their original DocumentDB spelling for backward compatibility.

Backward-compatibility evidence

Based on upstream 9c6bfbc (v1.2.2):

  • All operator packages pass go test -race ./... and go vet ./....
  • All 124 existing DocumentDB Helm tests pass.
  • make manifests generate leaves the existing serialized CRDs, RBAC and
    DocumentDB chart byte-identical to upstream. The shared Go API and its preview
    mirror gain an instance-bound constant without changing serialized fields.
  • The complete default-chart render is byte-identical to upstream with the
    same inputs.
  • The existing deprecated documentdb.io/preview endpoint still serves the
    same resource alongside documentdb.io/v1.
  • Existing shared/e2e helper unit tests pass; pinned lint reports no new findings.
  • Definition loading/mapping, canonical-schema equality, API/webhook identity,
    local catalog policy and definition-image upgrade/rollback guards are tested.
  • Explicit tests cover default-scheme isolation, offline CLI validation,
    configuration rejection, image/PostgreSQL overrides, mutation isolation and
    product-scoped backup restore validation. The exact CI patch-coverage command
    passes locally at 91.88%, without changing its 90% threshold.

Review follow-up in f28e3b8 also tests partial image objects through Kubernetes
structural defaulting, manager leader election with two replicas, registry
secrets on manager and injector, and enabled/required scheduling validation for
both non-local definitions and effective cluster overrides.

The failed Helm job stopped while installing the pinned helm-unittest plugin,
before executing tests. 9c0ee79 replaces that fragile hook with a pinned release
download and strict SHA-256 verification before extraction; the new hosted Helm
job passes. The plugin version and checksum verification are not weakened.

Real Kubernetes acceptance uses the existing DocumentDB chart/API with no
product definition
, stock public PostgreSQL 18 / DocumentDB 1.0.1 / gateway
images, cert-manager and CloudNative-PG. It compares a pristine upstream manager
against the proposed manager and checks:

  • Data seeded before a control-plane upgrade survives with unchanged CR, CNPG
    cluster, PVC, Service, certificate Secret and database-pod identities.
  • Mongo-driver CRUD, aggregation and CA/Service-hostname-verified TLS.
  • Existing resource updates and admission rejection of PVC shrink.
  • Three instances with unchanged upstream scheduling defaults, and two
    streaming, read-only standbys, on an isolated three-node test cluster.
  • Existing combined-image mode for a fresh DocumentDB resource.

One API-server webhook connection timed out immediately after a manager
rollout. Creation succeeded after endpoint convergence, without source changes;
the completed compatibility receipt includes that observation.

Independent coding-agent review

The dedicated code-review agent and a second independent coding agent reviewed
the full diff and found four additional issues, addressed in 87c6924 and
542da02:

  • Definition-driven extension-image rollback is checked before CNPG mutation
    against the live installed catalog. Stale CR status cannot authorize a binary
    downgrade; unavailable/unknown compatibility fails closed.
  • Extension identity/library/control-path/preload changes that cannot be
    synchronized atomically are rejected before image updates.
  • The bundled injector refuses another Service holding the same plugin identity,
    while allowing the exact owning release's Service to persist on upgrade.
    Namespace-scoped mocked lookup tests cover ownership and deletion cases.
  • Semver prerelease/build schema targets are validated through the actual
    rendered Kubernetes schema; legacy DocumentDB format constraints stay unchanged.

Verification includes 26 definition-image update scenarios, unchanged-CR and
stale-status rollback regressions, explicit legacy reconciliation coverage,
the complete operator race/vet/lint suites, all 124 existing chart tests,
eight new generic chart tests and a successful production Dockerfile build.

Scope / limitations

This is not a new product release or a change to the default DocumentDB chart.
The generic chart is experimental; publication/release integration is separate.
Native ARM64 local acceptance is not a claim that every Kubernetes distribution,
architecture, backup backend or multi-region topology was exercised. Existing
backup/multi-region/default paths remain covered by their unit suites.
For declarative clusters, changing local pinned images, extension layouts or
unversioned/digest-only target images in place is intentionally unsupported.
The injector guard requires server-side lookup; it does not arbitrate simultaneous
installations or detect other holders in offline rendering.

Hosted CI dependency blocker

govulncheck (operator/src) currently reports GO-2026-6974 in the existing
OpenTelemetry SDK/trace v1.45.0 dependencies (fixed in v1.47.0). I reproduced the
same finding and call traces by running govulncheck v1.10.0 against pristine
upstream 9c6bfbc, independently of this branch. This PR changes neither those
dependencies nor internal/controller/physical_replication.go.

The dependency issue is fixed independently by #530, whose six hosted scans pass.
Merge that maintenance PR before updating this branch from main. It is not being
suppressed or mixed into this product-runtime change. Other hosted checks may
still be running.

Copilot AI balanced review requested due to automatic review settings November 30, 2026 21:44

Copilot AI 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.

🟡 Changes recommended

Unresolved critical issues allow concurrent reconcilers and unintended PostgreSQL image changes, while anti-affinity validation bypasses and missing injector pull secrets create additional availability risks.

5 open issues
What changed in this PR

Adds opt-in declarative product definitions to the shared operator, allowing distributions to reuse its API types, controllers, and admission logic while retaining the existing no-definition DocumentDB startup path.

Changes:

  • Adds definition loading, offline validation, configurable API identity, and product defaults.
  • Passes the selected adapter through controllers and admission, with catalog and image-version safeguards.
  • Introduces an experimental Helm chart using synchronized canonical schemas, plus definition and chart contract tests.
File Description
operator/​src/​pkg/​core/​engine.go Updates adapter-contract comments.
operator/​src/​pkg/​core/​definition.go Exposes definition loading and shared adapter aliases.
operator/​src/​Makefile Synchronizes generic chart schemas during manifest generation.
operator/​src/​internal/​webhook/​imagevolume.go Requires ImageVolume support for declarative products.
operator/​src/​internal/​webhook/​documentdb_webhook.go Adds definition-aware admission identity and policies.
operator/​src/​internal/​webhook/​definition_test.go Tests definition policies and image-version guards.
operator/​src/​internal/​product/​testdata/​widget.json Provides a synthetic product definition.
operator/​src/​internal/​product/​profile.go Adds the pinned-catalog profile setting.
operator/​src/​internal/​product/​documentdb.go Supports definition-backed profiles, images, and API identity.
operator/​src/​internal/​product/​documentdb_backup.go Configures backup resource identities.
operator/​src/​internal/​product/​definition.go Implements definition validation, registration, and mapping.
operator/​src/​internal/​product/​definition_test.go Tests definition loading and adapter behavior.
operator/​src/​internal/​product/​definition_chart_test.go Tests schema synchronization and rendered API identity.
operator/​src/​internal/​engine/​extension.go Enforces exact non-upgrading catalog pins.
operator/​src/​internal/​engine/​extension_policy_test.go Tests pinned-catalog enforcement.
operator/​src/​internal/​controller/​scheduledbackup_controller.go Passes configured adapters to scheduled backups.
operator/​src/​internal/​controller/​pv_controller.go Passes the configured adapter to volume reconciliation.
operator/​src/​internal/​controller/​documentdb_controller.go Configures product reconciliation and image-mode requirements.
operator/​src/​internal/​controller/​certificate_controller.go Uses the selected adapter for certificates and watches.
operator/​src/​internal/​controller/​backup_controller.go Configures backup adapters and default replication hooks.
operator/​src/​cmd/​main.go Adds definition flags and wires the selected runtime.
operator/​product-helm-chart/​values.yaml Defines generic distribution settings.
operator/​product-helm-chart/​templates/​webhook.yaml Configures admission routing and TLS resources.
operator/​product-helm-chart/​templates/​role.yaml Grants shared runtime permissions.
operator/​product-helm-chart/​templates/​injector.yaml Packages the optional sidecar injector.
operator/​product-helm-chart/​templates/​deployment.yaml Deploys the manager with its product definition.
operator/​product-helm-chart/​templates/​crds.yaml Renders retained CRDs with selected API identities.
operator/​product-helm-chart/​templates/​_helpers.tpl Defines resource names and digest-pinned images.
operator/​product-helm-chart/​schemas/​scheduled-backup.yaml Copies the canonical scheduled-backup schema.
operator/​product-helm-chart/​schemas/​cluster.yaml Copies the canonical cluster schema.
operator/​product-helm-chart/​schemas/​backup.yaml Copies the canonical backup schema.
operator/​product-helm-chart/​README.md Documents setup, validation, and limitations.
operator/​product-helm-chart/​Makefile Provides schema-copy synchronization.
operator/​product-helm-chart/​Chart.yaml Declares the experimental chart.

Review effort: Balanced

@xgerman xgerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Found two additional correctness issues at 9c0ee79: semver definitions still use DocumentDB-specific admission version handling, and minimumInstances can exceed the shared API's supported range. Focused executable reproductions confirmed both; details are inline. The five previously addressed findings are not repeated.

Validation: all operator Go tests and go vet passed with GOPROXY=off; race-enabled tests passed for cmd, product, webhook, engine, CNPG and core. No live Kubernetes/E2E qualification was performed. Hosted govulncheck separately reports GO-2026-6974 in unchanged OpenTelemetry dependencies; that is not included as an introduced finding.

@hossain-rayhan

Copy link
Copy Markdown
Collaborator Author

The existing OpenTelemetry vulnerability blocker now has a separate dependency-only fix: #530, based directly on main. All six govulncheck module scans pass locally with the patch, along with operator race/vet/build checks and affected consumer tests. No shared-runtime source is included in #530. Merge #530 first, then update this branch from main and rerun its checks; no scan is suppressed or disabled.

@documentdb-triage-tool documentdb-triage-tool Bot added CI/CD documentation Improvements or additions to documentation go Pull requests that update go code test labels Nov 30, 2026
@documentdb-triage-tool

Copy link
Copy Markdown

🤖 Auto-triaged by documentdb-triage-tool.

Applied: go, test, CI/CD, documentation
Project fields suggested: Component controllers · Priority P2 · Effort XL · Status In Progress
Confidence: 0.95 (deterministic)

Reasoning

component from path globs (controllers, test, ci, docs); effort from diff stats (5582+49 LOC, 37 files)

If a label is wrong, ping @patty-chow so the rules can be tuned. Issues with component labels are left alone; PR component labels are reconciled from changed paths on every run.

@hossain-rayhan

Copy link
Copy Markdown
Collaborator Author

Completed two additional independent passes: the dedicated code-review agent and a second coding agent. They found four actionable gaps, now fixed in 87c6924 and 542da02: definition-image rollback before synchronization (including stale status vs authoritative SQL catalog), non-atomic extension layout updates, duplicate bundled injector identity lifecycle, and semantic prerelease schema targets. Added 26 guarded image-update cases, a legacy no-definition regression, eight mocked injector ownership tests and Kubernetes schema validation. Full race/vet/lint, 124 existing Helm tests and the production Docker build pass; exact patch coverage is 91.88%. Limitations and unsupported in-place transitions are explicit in the README/PR body. This materially strengthens the review, but is not a guarantee of zero future findings.

Comment thread .github/workflows/test-unit.yml Outdated
--pattern "$archive" --pattern helm-unittest-checksum.sha \
--dir "$download_dir"
cd "$download_dir"
checksum=$(awk -v file="*./_dist/${archive}" '$2 == file { print $1 }' helm-unittest-checksum.sha)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking readability suggestion: Could we download into _dist/ beneath the temporary working directory, matching the paths already in the upstream checksum file? Verification then becomes:

sha256sum --check --strict --ignore-missing _dist/helm-unittest-checksum.sha

This removes the awk, checksum regex and printf plumbing while retaining the pinned version and checksum verification. GNU sha256sum also fails if no listed file is checked. I verified this command against the actual v1.1.0 Linux/AMD64 release assets.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed—simplified in this follow-up. Assets now download beneath _dist/, verification uses sha256sum --check --strict --ignore-missing _dist/helm-unittest-checksum.sha, and extraction uses the same upstream path. Verified against the actual pinned v1.1.0 Linux/AMD64 release assets with GNU sha256sum: the selected valid archive passes; a directory with no matching archive and an intentionally corrupted archive both fail. The pinned version and checksum verification remain intact.

@xgerman xgerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Follow-up review of 9c0ee79..542da02: both previous correctness findings are fixed. Semver admission/restore preserves prerelease ordering, and definition loading rejects minimumInstances outside the shared 1..3 bound. No additional actionable correctness issues found in the follow-up changes, including the live-catalog image guard and injector ownership checks.

Verified locally:

  • Native macOS and Linux/ARM64 manager compilation; deployed the cross-compiled manager using the production runtime base.
  • Race-enabled validation/product/webhook/engine tests and go vet; 124 existing Helm tests and 8 generic injector tests.
  • Dedicated Kind v1.33.1 with ImageVolume enabled, cert-manager v1.19.6 and chart-pinned CNPG: existing lifecycle smoke passed with a real database reaching Ready, Mongo-driver ping, CNPG owner references and restricted sidecar security contexts.
  • Generic chart manager deployed successfully; four real API-server dry-run CREATE cases accepted/rejected release/RC targets and numeric RC ordering correctly. These are admission checks, not a generic-product data-plane qualification.
  • Actual offline CLI rejects minimumInstances=4.

The CI simplification suggestion is non-blocking. Hosted checks are not all green: ARM64 cluster-replication fails the rapid back-to-back failover/timeline-divergence test (replication timeout, then duplicate-key error on retry); AMD64 replication was canceled; operator govulncheck still reports the separately tracked dependency issue. This bounded approval does not establish those failures are unrelated or qualify HA/failover behavior.

@xgerman xgerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking simplification pass using the local Ousterhout/APOSD guidelines: the best opportunities are consolidating repeated decisions, not shortening safety checks. Three focused suggestions are inline: resolve images once, share version interpretation, and centralize common scheme registrations. All preserve the existing functionality and API contract; no feature removal, broad framework, or changes to the earlier approval are requested. The existing Helm-install simplification comment remains separate.

if reflect.DeepEqual(db.Spec.Affinity, Topology{}.Affinity) {
intent.Topology.Affinity = d.Topology.Affinity
}
intent.Images = d.Images

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking: resolve images once. ToClusterIntent first builds Images through ExtensionImage, GatewayImage and the legacy defaults, then applyDefinition discards that result and repeats the definition/CR override selection here. Readers must follow two resolution paths to understand the final images. Could one private adapter-owned image resolver supply both the intent and the existing image-access methods? That removes duplicated precedence decisions rather than introducing another adapter type. Keep the legacy environment/version fallbacks and the definition path's pull-policy/secret behavior unchanged. This follows APOSD's information-hiding principle; the existing override/defaulting tests should remain intact.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in ea728a8. One private adapter-owned resolveImages now supplies both ToClusterIntent and ExtensionImage/GatewayImage/CombinedImage. applyDefinition no longer rebuilds/discards images. The legacy environment/version/change-stream/combined fallbacks and definition pull-policy/default-secret/CR-override behavior are preserved by the existing resolver, defaulting and override tests; the full race suite passes.

return tag
}

func (p VersionPolicy) compare(first, second string) (int, error) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking: share version interpretation between admission and reconciliation. This format switch and semantic parsing/ordering also exist in engine/extension.go:74-98; engine/image_update.go now additionally calls the admission-oriented VersionPolicy.ImageRollback and converts its field errors back into an engine error. A small transport-neutral version policy could own normalization and comparison, with admission retaining field errors/warnings and the engine retaining its failure policy. That is preferable to another local comparison helper, which leaves the same decision in two places. Preserve the distinction between catalog and spec/status representations, exact pinned-catalog matching, and the live-catalog check before mutation. This is a maintainability suggestion, not a remaining version-ordering bug.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in ea728a8. product.VersionPolicy is now transport-neutral and owns image parsing, catalog<->spec/status conversion and both catalog/schema ordering. Admission delegates to it and retains field errors/warnings; reconciliation delegates to it and retains its own error policy instead of converting admission errors. Engine guards still query the authoritative live catalog before permitting mutation, and pinned-catalog exact matching remains separate and unchanged. Existing prerelease, rollback/restore, image-update and legacy tests pass; added representation/order consistency coverage.

Comment thread operator/src/cmd/main.go Outdated
}
adapter.Definition = definition
configured := runtime.NewScheme()
utilruntime.Must(clientgoscheme.AddToScheme(configured))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking: keep common scheme registration in one place. The client-go/CNPG/cert-manager/Fleet registrations here duplicate init() above, so adding a shared dependency requires remembering both startup paths. Extract just those common registrations into one small function used by both paths, then register either the existing DocumentDB API or the selected definition separately. That reduces change amplification without a runtime factory or controller-registration framework. Keep the default scheme and definition scheme isolated; do not copy all default registrations into the selected scheme, since that would reintroduce ambiguous shared Go-type identities.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in ea728a8 with registerCommonScheme, used by init and the definition path. It registers only client-go/CNPG/cert-manager/Fleet. Each caller then adds the default DocumentDB API or selected definition separately. Default-scheme identity and isolation tests remain unchanged and pass; no runtime factory/controller framework was introduced.

@xgerman xgerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two smaller, non-blocking conciseness suggestions beyond the earlier design comments. Both reuse existing helpers rather than adding new layers, and neither changes functionality. I would prioritize the earlier image/version consolidation over these local cleanups.

{{- if ne .Values.productDefinition.profile.SidecarInjectorPlugin "cnpg-i-sidecar-injector.documentdb.io" }}
{{- fail "the bundled injector implements cnpg-i-sidecar-injector.documentdb.io; use an external plugin for another RPC identity" }}
{{- end }}
{{- $image := required "sidecarInjector.image.repository is required" .Values.sidecarInjector.image.repository }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking: reuse the existing image helper. This repeats the repository/digest requirements and SHA-256 regex already in product.image in _helpers.tpl, followed by another repository@digest construction. Parameterize that existing helper with the component's image values and diagnostic prefix, then use it for both manager and injector images. This keeps immutable-image validation in one place without introducing another helper or changing the values contract.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in ea728a8. The existing product.image helper accepts component image values plus a diagnostic prefix, and both manager and injector use it. Repository/digest validation and SHA-256 regex are now defined once. Added table tests for missing repository/digest and malformed digest for both components; existing values and chart tests remain unchanged.

}

func TestDefinitionImageParticipatesInCommonVersionGuards(t *testing.T) {
definition, err := product.LoadDefinition("../product/testdata/widget.json")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Non-blocking, small cleanup: this setup is identical to the existing semverValidator in definition_version_test.go. These eight lines can become validator := semverValidator(t, "1.2.3"), leaving all assertions unchanged. Reuse it only for this semver fixture; the later restore test intentionally uses the legacy DocumentDB version format and should remain distinct.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in ea728a8: the semver image-guard test now uses semverValidator(t, "1.2.3"). Its assertions are unchanged, and the later legacy-format restore fixture remains distinct.

hossain-rayhan and others added 10 commits December 1, 2026 09:38
Add an opt-in product definition loader and common startup configuration. Reuse the existing shared API, adapter, controllers and admission; retain zero-value DocumentDB behavior. Add a generic Helm chart backed by canonical shared schemas, automatic schema synchronization and definition/version-policy contract tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Document automatic schema synchronization and the Helm-independent drift guard.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Extract startup product selection without changing its default behavior. Exercise the real offline CLI, default scheme isolation, invalid contracts, override/mutation safety, external endpoints, backup identities and restore guards. Meet the existing patch-coverage policy without exclusions or threshold changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Preserve definition-owned PostgreSQL images under API-server defaulting of partial image objects. Enable generic manager leader election, propagate injector registry secrets and enforce enabled required anti-affinity on non-local definitions and resolved CR overrides. Add focused schema-defaulting, chart and admission regression tests; preserve the existing DocumentDB chart/schema.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Replace the failing install hook checksum fetch with an authenticated release download and strict SHA-256 verification before extraction. Include generic chart changes in unit workflow triggers. Do not disable checksum checks or change the pinned plugin version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Use the selected extension format consistently for image parsing, schema bounds, rollback and restore guards. Preserve semantic prereleases while retaining the legacy DocumentDB policy. Reject definitions whose minimum exceeds the canonical API maximum, with a shared bound checked against both served schemas. Add reviewer reproductions through ValidateUpdate, restore validation and offline definition loading.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Reject duplicate plugin identities during server-side install/upgrade while retaining the current release service. Support semantic prerelease/build schema targets only for semver definitions. Add mocked Kubernetes lookup lifecycle tests and real API-schema validation, and run generic chart tests in CI. Preserve canonical schema copies and the existing DocumentDB chart.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Guard declarative extension image changes before CNPG synchronization. Reject rollback using both status and authoritative installed catalog checks, fail closed when compatibility cannot be verified, and reject extension identity/path/preload changes that cannot be synchronized atomically. Preserve legacy no-definition behavior and unchanged local pinned images. Add 26 guarded-update scenarios and legacy reconciliation coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Download pinned assets under _dist and use strict GNU checksum verification with ignore-missing, matching upstream release paths. Remove checksum parsing plumbing; verified that valid selected assets pass and missing/corrupt assets still fail.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
Use one adapter-owned image resolver for intent and image accessors. Move image/catalog/schema normalization and ordering to a transport-neutral product policy shared by admission and reconciliation, retaining transport-specific failures and live-catalog checks. Share common scheme registrations and parameterize the existing immutable-image helper for manager/injector. Reuse the semver test fixture and retain all precedence/defaulting regressions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 33b3cb3c-1b25-4ffb-bff1-ebf0f3d04058
Signed-off-by: Rayhan Hossain <hossain.rayhan@outlook.com>
@hossain-rayhan
hossain-rayhan force-pushed the rhossain/declarative-product-runtime branch from ea728a8 to 1427f0a Compare December 1, 2026 17:40
@hossain-rayhan

Copy link
Copy Markdown
Collaborator Author

Rebased onto current main 7fde74b, incorporating the merged OpenTelemetry maintenance fix (#530) and OTel metrics changes (#475). Resolved the reconciliation conflict by retaining both monitoring-role lifecycle handling and the pre-sync declarative image-safety guard. Local full operator race/vet/lint, all 132 Helm tests and operator govulncheck pass. Rebased head: 1427f0a. Hosted checks will rerun on the new revision.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD documentation Improvements or additions to documentation go Pull requests that update go code test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants