Repository navigation
feat: graduate Kubernetes CRDs to documentdb.io/v1 - #486
Conversation
Move the DocumentDB, Backup and ScheduledBackup custom resources from documentdb.io/preview to the stable documentdb.io/v1 CRD API now that operator 1.0.0 is GA. Only the Kubernetes CRD API version changes; the DocumentDB engine, gateway, wire protocol and images are unchanged. - api/preview -> api/v1 (git mv); v1 is the CRD storage version and the only version used by operator, plugin and test code (alias dbv1). - api/preview is kept as a deprecated, served version whose *_types.go are generated from api/v1 by hack/sync-preview-api.sh (run by make manifests). Schemas are identical, so the CRDs use conversion strategy None and no conversion webhook is needed. A parity test guards against drift. - Validating webhook moves to /validate-documentdb-io-v1-documentdb with matchPolicy Equivalent, so preview requests are still validated. - kubectl plugin, samples, e2e/longhaul manifests, playground and KubeFleet CRP selectors use v1. - Public docs move from docs/.../preview to docs/.../v1 with mkdocs-redirects for old URLs; upgrade guide documents the v1 migration (CRDs before helm upgrade, optional storage migration). Verified on kind (k8s 1.35): upgrade from published chart 1.0.0 with preview-stored resources keeps the database pod running, data intact, webhook enforcing on both versions; storage migration to v1 works; fresh v1 clusters and e2e lifecycle/status specs pass. Co-authored-by: Copilot <[email protected]> Copilot-Session: 6c85cd4b-f086-46f7-8823-7e63c33e4de7 Signed-off-by: Rayhan Hossain <[email protected]>
4a2d884 to
3865648
Compare
documentdb.io/v1documentdb.io/v1
There was a problem hiding this comment.
🟡 Changes recommended
The webhook URL change can block admission during upgrades and rollbacks, while several deployment scripts use v1 manifests with pinned charts whose CRDs only serve preview.
6 open issues
Webhook route switch breaks mixed-version upgrades · New Pinned chart lacks the v1 DocumentDB CRD · New OCI fallback chart lacks the v1 CRD · New Chart 0.1.112 does not serve the v1 API · New Pinned chart 0.1.0 lacks the v1 DocumentDB CRD · New Default-storage manifest is incompatible with chart 0.1.0 · New
What changed in this PR
Graduates the Kubernetes custom resources to documentdb.io/v1 as the stable storage API while retaining deprecated preview support, and updates operator consumers, tooling, examples, tests, and documentation.
Changes:
- Introduces stable API types, generated preview mirrors, and schema-parity checks.
- Migrates operator code, webhook configuration, CLI requests, manifests, and test fixtures to
v1. - Relocates public documentation and adds API-migration guidance and redirect support.
This pull request requires changes. One critical webhook upgrade/rollback issue and five moderate chart/API compatibility issues remain unresolved, as noted below.
| File | Description |
|---|---|
test/longhaul/monitor/k8sclient_test.go |
Migrates monitor tests to v1 types. |
test/longhaul/deploy/setup.yaml |
Uses v1 for the long-haul deployment. |
test/longhaul/backup/verifier.go |
Migrates backup-verifier types to v1. |
test/e2e/tests/upgrade/upgrade_schema_test.go |
Uses v1 schema-patch types. |
test/e2e/tests/upgrade/upgrade_schema_rollback_test.go |
Migrates rollback specifications to v1. |
test/e2e/tests/upgrade/upgrade_schema_ha_test.go |
Migrates HA upgrade specifications to v1. |
test/e2e/tests/upgrade/upgrade_schema_auto_test.go |
Migrates automatic-upgrade specifications to v1. |
test/e2e/tests/upgrade/upgrade_images_test.go |
Uses v1 image-configuration types. |
test/e2e/tests/tls/tls_service_recreation_test.go |
Uses v1 resources in TLS recovery tests. |
test/e2e/tests/tls/helpers_test.go |
Migrates TLS helper signatures to v1. |
test/e2e/tests/status/pv_name_test.go |
Updates the API source-path comment. |
test/e2e/tests/resources/helpers_test.go |
Returns v1 resources from helpers. |
test/e2e/tests/lifecycle/update_storage_test.go |
Uses v1 storage specifications. |
test/e2e/tests/lifecycle/update_loglevel_test.go |
Uses v1 log-level specifications. |
test/e2e/tests/lifecycle/update_image_test.go |
Uses v1 image specifications. |
test/e2e/tests/lifecycle/helpers_test.go |
Fetches v1 lifecycle resources. |
test/e2e/tests/feature_gates/iouring_test.go |
Accepts v1 test resources. |
test/e2e/tests/feature_gates/helpers_test.go |
Returns v1 feature-gate fixtures. |
test/e2e/tests/exposure/helpers_test.go |
Returns v1 exposure fixtures. |
test/e2e/tests/cluster_replication/timeline_divergence_test.go |
Uses v1 replication specifications. |
test/e2e/tests/cluster_replication/helpers_test.go |
Fetches v1 replication resources. |
test/e2e/tests/cluster_replication/cluster_replication_test.go |
Patches v1 replication resources. |
test/e2e/tests/cluster_replication/backup_test.go |
Uses v1 promotion specifications. |
test/e2e/tests/backup/helpers_test.go |
Builds v1 recovery resources. |
test/e2e/README.md |
Documents v1 scheme registration. |
test/e2e/pkg/e2eutils/testenv/env.go |
Registers the v1 API scheme. |
test/e2e/pkg/e2eutils/testenv/env_test.go |
Checks v1 scheme registration. |
test/e2e/pkg/e2eutils/portforward/portforward.go |
Accepts v1 DocumentDB resources. |
test/e2e/pkg/e2eutils/portforward/portforward_test.go |
Uses v1 port-forward fixtures. |
test/e2e/pkg/e2eutils/mongo/connect.go |
Fetches v1 resources for connections. |
test/e2e/pkg/e2eutils/fixtures/teardown_test.go |
Uses v1 teardown fixtures. |
test/e2e/pkg/e2eutils/fixtures/shared_scale.go |
Manages v1 scaling fixtures. |
test/e2e/pkg/e2eutils/fixtures/shared_ro.go |
Fetches v1 read-only fixtures. |
test/e2e/pkg/e2eutils/fixtures/fixtures.go |
Manages v1 fixture lifecycles. |
test/e2e/pkg/e2eutils/fixtures/fixtures_test.go |
Uses v1 fixture types. |
test/e2e/pkg/e2eutils/documentdb/documentdb.go |
Creates and decodes v1 resources. |
test/e2e/pkg/e2eutils/documentdb/documentdb_test.go |
Renders a v1 test manifest. |
test/e2e/pkg/e2eutils/backup/scheduledbackup.go |
Manages v1 scheduled backups. |
test/e2e/pkg/e2eutils/assertions/assertions.go |
Reads v1 resources for assertions. |
test/e2e/pkg/e2eutils/assertions/assertions_test.go |
Uses v1 assertion fixtures. |
test/e2e/manifests/mixins/tls_selfsigned.yaml.template |
Targets v1 for self-signed TLS. |
test/e2e/manifests/mixins/tls_provided.yaml.template |
Targets v1 for provided TLS. |
test/e2e/manifests/mixins/tls_certmanager.yaml.template |
Targets v1 for cert-manager TLS. |
test/e2e/manifests/mixins/storage_custom.yaml.template |
Targets v1 for custom storage. |
test/e2e/manifests/mixins/sidecar_resources.yaml.template |
Targets v1 for sidecar resources. |
test/e2e/manifests/mixins/sidecar_resources_explicit.yaml.template |
Targets v1 for explicit sidecar resources. |
test/e2e/manifests/mixins/schema_version.yaml.template |
Targets v1 for schema configuration. |
test/e2e/manifests/mixins/reclaim_retain.yaml.template |
Targets v1 for volume retention. |
test/e2e/manifests/mixins/feature_iouring.yaml.template |
Targets v1 for io_uring configuration. |
test/e2e/manifests/mixins/exposure_loadbalancer.yaml.template |
Targets v1 for external exposure. |
test/e2e/manifests/mixins/exposure_clusterip.yaml.template |
Targets v1 for internal exposure. |
test/e2e/manifests/mixins/documentdb_version.yaml.template |
Targets v1 for engine versions. |
test/e2e/manifests/mixins/cluster-replication.yaml.template |
Targets v1 for replication. |
test/e2e/manifests/base/documentdb.yaml.template |
Uses v1 in the base manifest. |
test/e2e/manifests/backup/scheduled_backup.yaml.template |
Creates v1 scheduled backups. |
test/e2e/manifests/backup/recovery_from_pv.yaml.template |
Uses v1 for PV recovery. |
test/e2e/manifests/backup/recovery_from_backup.yaml.template |
Uses v1 for backup recovery. |
test/e2e/manifests/backup/backup.yaml.template |
Creates v1 backups. |
README.md |
Links to v1 documentation. |
operator/src/scripts/development/deploy.sh |
Emits a v1 development resource. |
operator/src/scripts/deployment-examples/single-node-documentdb.yaml |
Uses v1 in the deployment example. |
operator/src/scripts/deployment-examples/create-cluster.sh |
Emits v1 deployment manifests. Moderate, 2 votes each: line 458’s custom-storage branch and line 479’s default-storage branch are incompatible with the installed, preview-only chart 0.1.0. Retain preview manifests or update the chart pin. |
operator/src/PROJECT |
Points scaffolding to the v1 package. |
operator/src/pkg/core/second_product_test.go |
Uses shared v1 API types. |
operator/src/pkg/core/engine_test.go |
Uses v1 status and monitoring types. |
operator/src/Makefile |
Synchronizes preview types and generates v1 API documentation. |
operator/src/internal/utils/util.go |
Accepts v1 DocumentDB resources. |
operator/src/internal/utils/replication_context.go |
Uses v1 replication types. |
operator/src/internal/product/intent.go |
Uses the v1 monitoring specification. |
operator/src/internal/product/documentdb_backup.go |
Adapts v1 backup resources. |
operator/src/internal/product/cluster.go |
Uses shared v1 configuration types. |
operator/src/internal/product/cluster_test.go |
Exercises adapters with v1 types. |
operator/src/internal/otel/options_test.go |
Uses v1 monitoring fixtures. |
operator/src/internal/otel/config.go |
Accepts v1 monitoring specifications. |
operator/src/internal/engine/scheduledbackup.go |
Uses v1 scheduling types and helpers. |
operator/src/internal/engine/helpers_test.go |
Registers v1 fake-client resources. |
operator/src/internal/controller/scheduledbackup_controller.go |
Reconciles v1 scheduled backups. |
operator/src/internal/controller/scheduledbackup_controller_test.go |
Uses v1 controller fixtures. |
operator/src/internal/controller/pv_controller.go |
Uses v1 resource ownership adapters. |
operator/src/internal/controller/physical_replication.go |
Accepts v1 replication resources. |
operator/src/internal/controller/certificate_controller.go |
Watches and reconciles v1 resources. |
operator/src/internal/controller/backup_controller.go |
Reconciles v1 backups. |
operator/src/internal/cnpg/testdata/golden/replica-region-ignores-recovery.json |
Expects a v1 owner reference. |
operator/src/internal/cnpg/testdata/golden/recovery-pv.json |
Expects a v1 recovery owner. |
operator/src/internal/cnpg/testdata/golden/recovery-backup.json |
Expects a v1 recovery owner. |
operator/src/internal/cnpg/testdata/golden/full.json |
Expects a v1 owner reference. |
operator/src/internal/cnpg/testdata/golden/explicit-component-resources.json |
Expects a v1 owner reference. |
operator/src/internal/cnpg/testdata/golden/env-overrides.json |
Expects a v1 owner reference. |
operator/src/internal/cnpg/testdata/golden/defaults.json |
Expects a v1 owner reference. |
operator/src/internal/cnpg/second_product_test.go |
Uses v1 monitoring configuration. |
operator/src/internal/cnpg/resource_validation.go |
Validates v1 resource specifications. |
operator/src/internal/cnpg/resource_split.go |
Computes resource splits from v1 types. |
operator/src/internal/cnpg/pg_defaults.go |
Resolves parameters from v1 resources. |
operator/src/internal/cnpg/cnpg_intent_test.go |
Builds intents from v1 fixtures. |
operator/src/internal/cnpg/cnpg_cluster.go |
Renders CNPG configuration from v1 types. |
operator/src/hack/sync-preview-api.sh |
Generates deprecated preview type mirrors. |
operator/src/config/webhook/manifests.yaml |
Targets the v1 admission endpoint. |
operator/src/config/samples/kustomization.yaml |
References the renamed v1 sample. |
operator/src/config/samples/db_v1_documentdb.yaml |
Provides a v1 sample resource. |
operator/src/config/crd/bases/documentdb.io_scheduledbackups.yaml |
Adds v1 storage and deprecates preview. |
operator/src/config/crd/bases/documentdb.io_backups.yaml |
Adds v1 storage and deprecates preview. |
operator/src/cmd/main.go |
Registers the v1 operator scheme. |
operator/src/api/v1/suite_test.go |
Renames the API test suite. |
operator/src/api/v1/scheduledbackup_types.go |
Defines stable ScheduledBackup types. |
operator/src/api/v1/scheduledbackup_funcs.go |
Moves scheduling helpers to v1. |
operator/src/api/v1/scheduledbackup_funcs_test.go |
Moves scheduling tests to v1. |
operator/src/api/v1/groupversion_info.go |
Registers documentdb.io/v1. |
operator/src/api/v1/documentdb_funcs.go |
Moves DocumentDB helpers to v1. |
operator/src/api/v1/documentdb_funcs_test.go |
Moves DocumentDB helper tests to v1. |
operator/src/api/v1/backup_types.go |
Defines stable Backup types. |
operator/src/api/v1/backup_funcs.go |
Moves backup helpers to v1. |
operator/src/api/v1/backup_funcs_test.go |
Moves backup tests to v1. |
operator/src/api/preview/zz_generated.deepcopy.go |
Refreshes the generated runtime import alias. |
operator/src/api/preview/schema_parity_test.go |
Checks version schema parity and CRD metadata. |
operator/src/api/preview/scheduledbackup_types.go |
Marks generated preview types deprecated. |
operator/src/api/preview/groupversion_info.go |
Documents the compatibility-only package. |
operator/src/api/preview/documentdb_types.go |
Marks generated preview types deprecated. |
operator/src/api/preview/backup_types.go |
Marks generated preview types deprecated. |
operator/documentdb-helm-chart/templates/10_documentdb_webhook.yaml |
Configures v1 admission with equivalent matching. Critical, 2 votes, line 83: switching the route while old pods remain ready causes 404 responses and admission rejection under failurePolicy: Fail; rollback has the inverse mismatch. Preserve a compatible route or stage the switch after serving pods are compatible. |
operator/documentdb-helm-chart/crds/documentdb.io_scheduledbackups.yaml |
Packages both served API versions. |
operator/documentdb-helm-chart/crds/documentdb.io_backups.yaml |
Packages both served API versions. |
documentdb-playground/tls/scripts/tls-connectivity-check.sh |
Emits v1 TLS resources. |
documentdb-playground/tls/scripts/setup-selfsigned-gateway-tls.sh |
Emits a v1 self-signed TLS resource. |
documentdb-playground/tls/scripts/documentdb-provided-mode-setup.sh |
Emits a v1 provided-TLS resource. |
documentdb-playground/telemetry/scripts/deploy-multi-tenant-telemetry.sh |
Emits v1 tenant resources. |
documentdb-playground/telemetry/scripts/create-cluster.sh |
Emits v1 telemetry resources. Moderate, 2 votes, line 472 (also 493): pinned chart 0.1.112 does not serve v1, so instance creation fails. Retain preview manifests or install a chart with the new CRDs. |
documentdb-playground/telemetry/local/k8s/documentdb/cluster.yaml |
Uses v1 in the local deployment. |
documentdb-playground/sync_service/README.md |
Updates the example API and documentation link. |
documentdb-playground/operator-upgrade-guide/test-documentdb-versioned.yaml |
Uses v1 in the versioned fixture. |
documentdb-playground/operator-upgrade-guide/test-documentdb-cluster.yaml |
Uses v1 in the upgrade fixture. |
documentdb-playground/multi-cloud-deployment/documentdb-cluster.yaml |
Updates the resource and Fleet selector. |
documentdb-playground/lightrag/documentdb.yaml |
Uses v1 in the application example. |
documentdb-playground/keda-autoscaling/README.md |
Links to v1 documentation. |
documentdb-playground/keda-autoscaling/manifests/documentdb-instance.yaml |
Uses v1 in the autoscaling resource. |
documentdb-playground/io-uring-feature/manifests/documentdb-iouring.yaml |
Uses v1 in the io_uring resource. |
documentdb-playground/fleet-add-region/documentdb-resource-crp.yaml |
Updates the resource and Fleet selector. |
documentdb-playground/contrib/telemetry-and-cost-optimized-eks/scripts/create-cluster.sh |
Emits a v1 EKS resource. Moderate, 2 votes, line 783: the OCI fallback installs preview-only chart 0.1.0, making the manifest unsupported. Retain preview or update the fallback chart. |
documentdb-playground/aws-setup/scripts/create-cluster.sh |
Emits a v1 AWS resource. Moderate, 2 votes, line 508: operator installation still pins preview-only chart 0.1.0, so instance creation fails. Retain preview or update the chart pin. |
documentdb-playground/aws-setup/README.md |
Links to v1 documentation. |
documentdb-playground/arc-hybrid-setup-with-fleet/scripts/bash/deploy-documentdb-fleet.sh |
Emits v1 Fleet resources. |
documentdb-playground/arc-hybrid-setup-with-fleet/documentdb-instance.yaml |
Uses v1 in the hybrid resource. |
documentdb-playground/aks-setup/scripts/create-cluster.sh |
Emits v1 AKS resources. |
documentdb-playground/aks-setup/README.md |
Updates the API example and documentation links. |
documentdb-playground/aks-fleet-deployment/README.md |
Uses v1 in backup and recovery examples. |
documentdb-playground/aks-fleet-deployment/documentdb-resource-crp.yaml |
Updates the resource and Fleet selector. |
documentdb-kubectl-plugin/cmd/status_run_test.go |
Uses a v1 owner-reference fixture. |
documentdb-kubectl-plugin/cmd/promote.go |
Uses the v1 GVR and resource types. |
docs/operator-public-documentation/v1/operations/upgrades.md |
Documents CRD application order and storage migration. |
docs/operator-public-documentation/v1/operations/restore-deleted-cluster.md |
Uses v1 in the recovery example. |
docs/operator-public-documentation/v1/operations/failover.md |
Relocates failover documentation. |
docs/operator-public-documentation/v1/operations/backup-and-restore.md |
Uses v1 in backup and restore examples. |
docs/operator-public-documentation/v1/multi-region-deployment/overview.md |
Uses v1 in replication configuration. |
docs/operator-public-documentation/v1/multi-region-deployment/multi-cloud.md |
Uses v1 in the multi-cloud example. |
docs/operator-public-documentation/v1/monitoring/overview.md |
Uses v1 in monitoring examples. |
docs/operator-public-documentation/v1/monitoring/metrics.md |
Relocates the metrics reference. |
docs/operator-public-documentation/v1/kubectl-plugin.md |
Relocates plugin documentation. |
docs/operator-public-documentation/v1/index.md |
Explains stable API status and updates examples. |
docs/operator-public-documentation/v1/high-availability/local-ha.md |
Uses v1 in HA examples. |
docs/operator-public-documentation/v1/getting-started/quickstart-kind.md |
Uses v1 in Kind examples. |
docs/operator-public-documentation/v1/getting-started/quickstart-k3s.md |
Uses v1 in K3s examples. |
docs/operator-public-documentation/v1/getting-started/deploy-on-gke.md |
Removes preview wording from a link. |
docs/operator-public-documentation/v1/getting-started/deploy-on-eks.md |
Uses v1 in the EKS example. |
docs/operator-public-documentation/v1/getting-started/deploy-on-aks.md |
Updates the API link and preview wording. |
docs/operator-public-documentation/v1/faq.md |
Updates production-readiness and API-stability wording. |
docs/operator-public-documentation/v1/configuration/tls.md |
Uses v1 in TLS examples. |
docs/operator-public-documentation/v1/configuration/storage.md |
Uses v1 in storage configuration. |
docs/operator-public-documentation/v1/configuration/networking.md |
Uses v1 in networking examples. |
docs/operator-public-documentation/v1/advanced-configuration/README.md |
Uses v1 in the HA example. |
docs/operator-public-documentation/postgresql-tuning.md |
Uses v1 in tuning examples. |
docs/operator-public-documentation/io-uring.md |
Updates API examples and reference links. |
docs/operator-public-documentation/index.md |
Redirects the documentation root to v1. |
docs/developer-guides/testing-with-fork-images.md |
Updates the API example and quickstart link. |
docs/developer-guides/sidecar-injector-plugin-configuration.md |
Uses v1 in sidecar examples. |
docs/developer-guides/manual-multi-cloud-deployment-guide.md |
Uses v1 in deployment configuration. |
docs/developer-guides/development-environment.md |
Adds the documentation redirect dependency. |
docs/designs/long-haul-test-design.md |
Updates typed API references. |
docs/designs/e2e-test-suite.md |
Updates API package and scheme references. |
docs/designs/backup-and-restore-design.md |
Uses v1 in design examples. |
AGENTS.md |
Documents v1 sources and preview generation. |
.github/workflows/test-e2e.yml |
Uses v1 in admission validation. |
.github/workflows/deploy_docs.yml |
Installs the MkDocs redirect plugin. |
.github/copilot-review-instructions.md |
Updates the API-source review path. |
.github/agents/documentation-agent.md |
Updates documentation and API-source paths. |
.github/actions/setup-test-environment/action.yml |
Creates a v1 test resource. |
Review effort: Balanced
| name: documentdb-webhook-service | ||
| namespace: {{ $ns }} | ||
| path: /validate-documentdb-io-preview-documentdb | ||
| path: /validate-documentdb-io-v1-documentdb |
| # Deploy DocumentDB instance | ||
| kubectl apply -f - <<EOF | ||
| apiVersion: documentdb.io/preview | ||
| apiVersion: documentdb.io/v1 |
| # Deploy DocumentDB instance | ||
| kubectl apply -f - <<EOF | ||
| apiVersion: documentdb.io/preview | ||
| apiVersion: documentdb.io/v1 |
| # Use custom Premium SSD storage class | ||
| kubectl apply -f - <<EOF | ||
| apiVersion: documentdb.io/preview | ||
| apiVersion: documentdb.io/v1 |
| # Use custom Premium SSD storage class | ||
| kubectl apply -f - <<EOF | ||
| apiVersion: documentdb.io/preview | ||
| apiVersion: documentdb.io/v1 |
| # Use AKS default storage (StandardSSD_LRS) | ||
| kubectl apply -f - <<EOF | ||
| apiVersion: documentdb.io/preview | ||
| apiVersion: documentdb.io/v1 |
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test, controllers, docs, playground, api, manifests, ci, kubectl-plugin, codegen); effort from diff stats (7287+1687 LOC, 229 files); LLM: Graduating CRDs to a stable v1 API is a cross-component, release-significant change touching API definitions, manifests, codegen, controllers, kubectl-plugin, docs, CI, and tests with schema/protocol implications. If a label is wrong, remove it manually and ping |
Resolve conflicts with main (combined-image fallback, 1.1.0/1.1.1 releases, CNPG condition, cert-manager CVE fix): - docs v1/index.md: keep v1 API wording, take operator 1.1.0 from main - controller and webhook tests: keep dbv1 import, add main's new imports Port code new on main to the v1 API: - internal/product, internal/engine image-mode tests, controller and webhook tests: dbpreview -> dbv1 - test-e2e.yml imageMode=auto step: apiVersion documentdb.io/v1 - Dockerfile_combined documentation label: latest/v1 docs URL Co-authored-by: Copilot <[email protected]> Copilot-Session: 9f1a71b4-9969-4456-9f65-8d19dd550d8e Signed-off-by: Rayhan Hossain <[email protected]>


Summary
Operator 1.0.0 is GA, but the operator's Kubernetes custom resources (
DocumentDB,Backup,ScheduledBackup) were still served only asapiVersion: documentdb.io/preview. This PR makesdocumentdb.io/v1the stable CRD API and storage version, and keepspreviewas a deprecated, still-served version so existing 1.0.0 installs upgrade without changes.Changes
API / CRDs
operator/src/api/previewis moved tooperator/src/api/v1withgit mv, so history follows the files.v1is marked+kubebuilder:storageversion.api/previewkeeps only the deprecated version. Its*_types.gofiles are generated fromapi/v1byhack/sync-preview-api.sh, whichmake manifestsruns, and are marked+kubebuilder:deprecatedversion.preview(deprecated, warning on use) andv1(storage), with conversionstrategy: None. The schemas are identical, so no conversion webhook is needed.api/preview/schema_parity_test.go, fails if thepreviewandv1schemas, subresources or printer columns differ.Operator / tooling
api/v1with a single alias,dbv1, replacing the mixeddbpreview,previewv1andpreviewaliases./validate-documentdb-io-v1-documentdb, withmatchPolicy: Equivalent, so requests that useprevieware still validated.v1GVR.PROJECTfile, Makefile (api-docs), samples (db_v1_documentdb.yaml), e2e and long-haul manifests, golden files, playground scripts and KubeFleet CRP selectors are updated tov1.Docs
docs/operator-public-documentation/preview/moved to.../v1/.mkdocs-redirectskeeps old.../preview/...URLs working; the plugin is added todeploy_docs.ymland the dev guide.documentdb.io/v1API section. It says to apply CRDs beforehelm upgradeand gives the optional commands to re-save existing resources asv1and trimstoredVersions.Upgrade notes (for users)
helm upgrade. Helm doesn't upgrade CRDs, and the new operator needsv1.previewresources and manifests keep working, with a deprecation warning.apiVersion: documentdb.io/v1. No field changes are needed.Testing
make testplusgo test ./...in the kubectl plugin,test/shared,test/longhaulandtest/e2e/pkgall pass. I also checked that the parity test fails on schema drift.helm unittestpasses (109 tests).make manifests generate api-docsproduces no diff.mkdocs buildhas no warnings, and old URLs redirect.previewDocumentDB and ScheduledBackup, and inserted 100 documents.helm upgradeto this chart. The database pod kept the same UID with no restart, the cluster stayed healthy, all data was intact, and the operator logged no errors.v1andpreview. Writes throughpreviewread back correctly throughv1.v1, andstoredVersionswas trimmed to["v1"].