Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,19 @@ jobs:
fi
# Pin the version so the operator resolves the released combined tag.
SPEC_IMAGES="documentDBVersion: \"${VERSION}\""
# Expect the extension shipped in the same release's ImageVolume
# image. A release can rebuild an engine without changing its
# schema (1.0.1 ships extension 1.0-0), so the version string
# alone doesn't determine the extension version.
EXT_CTR=$(docker create --platform "linux/${ARCH}" \
"ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:${VERSION}" /none)
EXT_VERSION=$(docker export "$EXT_CTR" | tar -xO share/extension/documentdb.control \
| sed -nE "s/^default_version[[:space:]]*=[[:space:]]*'([^']+)'.*/\1/p")
docker rm "$EXT_CTR" >/dev/null
if [[ -z "$EXT_VERSION" ]]; then
echo "::error::could not read default_version from documentdb:${VERSION} (linux/${ARCH})"
exit 1
fi
else
VERSION="${EXT_IMAGE_TAG}"
IMAGE="${REPO}:18-${EXT_IMAGE_TAG}-${ARCH}"
Expand All @@ -762,13 +775,13 @@ jobs:
# The operator reuses the release tag of spec.image.documentDB for
# the combined image, which resolves to the loaded image.
SPEC_IMAGES="image: {documentDB: \"${DOCUMENTDB_IMAGE_RESOLVED}\", gateway: \"${GATEWAY_IMAGE_RESOLVED}\"}"
# PR-built images are built from this version, and the build job
# checks the packaged schema matches it (1.0.0 -> 1.0-0, RCs such
# as 1.0-RC2 -> 1.0-0). Strip the CI run suffix from per-run tags.
EXT_VERSION=$(RAW_VERSION="${VERSION%-test-*}" DOCUMENTDB_GATEWAY_IMAGE_REPO=unused \
bash .github/scripts/resolve-documentdb-version.sh | sed -n 's/^documentdb_version_dash=//p')
fi
echo "Expected combined image: ${IMAGE} (linux/${ARCH})"
# The pg_extension version is the resolver's documentdb_version_dash
# (1.0.0 -> 1.0-0, RCs such as 1.0-RC2 -> 1.0-0). Strip the CI run
# suffix from per-run tags first.
EXT_VERSION=$(RAW_VERSION="${VERSION%-test-*}" DOCUMENTDB_GATEWAY_IMAGE_REPO=unused \
bash .github/scripts/resolve-documentdb-version.sh | sed -n 's/^documentdb_version_dash=//p')
{
echo "EXPECTED_IMAGE=${IMAGE}"
echo "SPEC_IMAGES=${SPEC_IMAGES}"
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## [Unreleased]

## [1.2.1] - 2026-11-20

Security release. The default DocumentDB engine moves from `1.0.0` to `1.0.1`: the same engine (extension schema `1.0-0`) rebuilt on patched Debian packages. Unpinned clusters roll onto the new images when the operator is upgraded; there is no schema migration. The CRDs are unchanged from `1.2.0`; when upgrading from `1.1.x` or earlier, apply the `1.2.1` CRDs before `helm upgrade`.

### Security
- Default DocumentDB engine `1.0.1` fixes the zlib vulnerabilities [CVE-2026-85091](https://nvd.nist.gov/vuln/detail/CVE-2026-85091) (High) and [CVE-2026-27171](https://nvd.nist.gov/vuln/detail/CVE-2026-27171) (Medium) present in the `documentdb`, `gateway` and `documentdb-combined` `1.0.0` images (#504). Clusters on earlier operators can move to `1.0.1` without an operator upgrade by setting `spec.documentDBVersion: "1.0.1"`, or the chart value `documentDbVersion=1.0.1`. See [Engine 1.0.1 security update](docs/operator-public-documentation/v1/operations/upgrades.md#engine-101-security-update).

## [1.2.0] - 2026-11-19

Operator release for DocumentDB 1.0; the default DocumentDB engine stays at `1.0.0` (extension schema `1.0-0`), so only the operator, sidecar, CRDs and Helm chart change. The `DocumentDB`, `Backup` and `ScheduledBackup` resources graduate to the stable `documentdb.io/v1` API. **Apply the 1.2.0 CRDs before `helm upgrade`**; existing `documentdb.io/preview` resources and manifests keep working and existing clusters are not restarted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ The operator and the DocumentDB engine have separate version numbers. The Helm c

| Operator (Helm chart) | Default DocumentDB engine | Status |
|-----------------------|---------------------------|--------|
| `1.2.1` | `1.0.1` (extension schema `1.0-0`) | Generally available; security update: default engine images rebuilt on patched Debian packages |
| `1.2.0` | `1.0.0` (extension schema `1.0-0`) | Generally available; graduates the CRDs to the stable `documentdb.io/v1` API (`preview` is deprecated but still served) |
| `1.1.0` | `1.0.0` (extension schema `1.0-0`) | Generally available; adds the combined-image fallback for clusters without image volume support |
| `1.0.0` | `1.0.0` (extension schema `1.0-0`) | Generally available |
| `1.0.0-rc1` | `1.0-RC2` | Release candidate |
| `0.3.0` | `0.110.0` | Preview |

Use operator `1.2.0` for DocumentDB 1.0. To move existing clusters to 1.0, see [Upgrading to DocumentDB 1.0](../operations/upgrades.md#upgrading-to-documentdb-10).
Use operator `1.2.1` for DocumentDB 1.0. To move existing clusters to 1.0, see [Upgrading to DocumentDB 1.0](../operations/upgrades.md#upgrading-to-documentdb-10). Engine `1.0.1` is the `1.0.0` engine (same extension schema `1.0-0`) rebuilt with security fixes; see [Engine 1.0.1 security update](../operations/upgrades.md#engine-101-security-update).

## Terminology

Expand Down
2 changes: 1 addition & 1 deletion docs/operator-public-documentation/v1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DocumentDB is the engine powering vCore-based Azure Cosmos DB for MongoDB. Built
When you deploy a DocumentDB cluster, the operator creates and manages PostgreSQL instances, the [DocumentDB Gateway](https://github.com/microsoft/documentdb/tree/main/pg_documentdb_gw), and supporting Kubernetes resources. The gateway enables you to connect with MongoDB-compatible drivers, APIs, and tools, while PostgreSQL serves as the underlying storage engine.

!!! note
Operator `1.2.0` is generally available for DocumentDB 1.0. The stable API version is `documentdb.io/v1`; the earlier `documentdb.io/preview` version is deprecated but still served for existing resources. We welcome your feedback and contributions!
Operator `1.2.1` is generally available for DocumentDB 1.0. The stable API version is `documentdb.io/v1`; the earlier `documentdb.io/preview` version is deprecated but still served for existing resources. We welcome your feedback and contributions!

## Quickstart

Expand Down
24 changes: 24 additions & 0 deletions docs/operator-public-documentation/v1/operations/upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,30 @@ Whether you can roll back depends on whether the schema has been updated:
!!! tip
This is why the default two-phase mode exists — it gives you a rollback-safe window before committing the schema change. Always back up before upgrading, and validate the new binary before setting `schemaVersion`.

### Engine 1.0.1 security update

DocumentDB engine `1.0.1` is the `1.0.0` engine rebuilt on patched Debian packages. It fixes the zlib vulnerabilities [CVE-2026-85091](https://nvd.nist.gov/vuln/detail/CVE-2026-85091) and [CVE-2026-27171](https://nvd.nist.gov/vuln/detail/CVE-2026-27171) in the `documentdb`, `gateway` and `documentdb-combined` `1.0.0` images. The extension schema is unchanged (`1.0-0`), so moving to `1.0.1` is a rolling restart with no schema migration.

Operator `1.2.1` and later deploy `1.0.1` by default. Earlier operators (`1.0.x`, `1.1.x`, `1.2.0`) default to `1.0.0`; you can move to `1.0.1` without upgrading the operator:

- **One cluster:** set `spec.documentDBVersion` to `1.0.1`:

```bash
kubectl patch documentdb my-cluster -n default \
--type merge -p '{"spec":{"documentDBVersion":"1.0.1"}}'
```

- **Every cluster that doesn't pin `spec.documentDBVersion`:** change the chart's default engine and keep your current chart version:

```bash
helm upgrade documentdb-operator oci://ghcr.io/documentdb/documentdb-operator \
--version <your-current-chart-version> \
--namespace documentdb-operator \
--reuse-values --set documentDbVersion=1.0.1 --wait
```

If a cluster sets `spec.image.documentDB` or `spec.image.gateway`, change those tags to `1.0.1` as well; explicit images take precedence. Don't set `spec.schemaVersion: "1.0.1"`: engine `1.0.1` has no schema change.

### Upgrading to DocumentDB 1.0

Run DocumentDB 1.0 on operator `1.0.0`, the release tested with it. Before upgrading the operator, pin `spec.documentDBVersion` on every cluster to the version it runs now (see the warning in [Upgrading the Operator](#upgrading-the-operator)), and remove `schemaVersion: "auto"` so nothing migrates before you choose to. Then upgrade the operator and move each cluster:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func (config *Configuration) applyDefaults() {
// Set defaults
if config.GatewayImage == "" {
// NOTE: Keep in sync with operator/src/internal/utils/constants.go:DEFAULT_GATEWAY_IMAGE
config.GatewayImage = "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0"
config.GatewayImage = "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1"
}
if config.GatewayImagePullPolicy == "" {
config.GatewayImagePullPolicy = corev1.PullIfNotPresent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestApplyDefaults(t *testing.T) {
t.Run("sets default gateway image when empty", func(t *testing.T) {
config := &Configuration{}
config.applyDefaults()
expected := "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0"
expected := "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1"
if config.GatewayImage != expected {
t.Errorf("expected %q, got %q", expected, config.GatewayImage)
}
Expand Down
4 changes: 2 additions & 2 deletions operator/documentdb-helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: documentdb-operator
version: 1.2.0
version: 1.2.1
description: A Helm chart for deploying the DocumentDB operator
# The operator prefers the Kubernetes ImageVolume feature (GA in 1.35, beta and
# opt-in via feature gate in 1.33/1.34, and needs containerd >= 2.1 or
Expand All @@ -11,7 +11,7 @@ description: A Helm chart for deploying the DocumentDB operator
kubeVersion: ">= 1.32.0-0"
# appVersion controls the default image tag for operator, sidecar, and wal-replica images.
# Database image versions (documentdb extension + gateway) are controlled by documentDbVersion in values.yaml.
appVersion: "1.2.0"
appVersion: "1.2.1"
dependencies:
- name: cloudnative-pg
version: "0.28.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: "ghcr.io/documentdb/documentdb-kubernetes-operator/sidecar:1.2.0"
value: "ghcr.io/documentdb/documentdb-kubernetes-operator/sidecar:1.2.1"

- it: should use a custom sidecar image tag when set
set:
Expand All @@ -82,7 +82,7 @@ tests:
path: spec.template.spec.containers[0].env
content:
name: DOCUMENTDB_VERSION
value: "1.0.0"
value: "1.0.1"

- it: should have empty env when documentDbVersion is empty
set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: "ghcr.io/documentdb/documentdb-kubernetes-operator/wal-replica:1.2.0"
value: "ghcr.io/documentdb/documentdb-kubernetes-operator/wal-replica:1.2.1"

- it: should use a custom wal-replica image tag when set
set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: "ghcr.io/documentdb/documentdb-kubernetes-operator/operator:1.2.0"
value: "ghcr.io/documentdb/documentdb-kubernetes-operator/operator:1.2.1"

- it: should use a custom image tag when set
set:
Expand All @@ -71,7 +71,7 @@ tests:
asserts:
- equal:
path: spec.template.spec.containers[0].image
value: "mcr.microsoft.com/documentdb/documentdb-kubernetes-operator/operator:1.2.0"
value: "mcr.microsoft.com/documentdb/documentdb-kubernetes-operator/operator:1.2.1"

- it: should use a per-component full-ref repository verbatim, ignoring image.registry
set:
Expand Down Expand Up @@ -312,7 +312,7 @@ tests:
path: spec.template.spec.containers[0].env
content:
name: DOCUMENTDB_VERSION
value: "1.0.0"
value: "1.0.1"

- it: should omit DOCUMENTDB_VERSION env when documentDbVersion is empty
set:
Expand Down
2 changes: 1 addition & 1 deletion operator/documentdb-helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1
# which determines the default documentdb extension and gateway image tags at runtime.
# This version is INDEPENDENT of Chart.appVersion (which controls operator/sidecar image tags).
# When empty, the operator falls back to its compiled-in defaults (see constants.go).
documentDbVersion: "1.0.0"
documentDbVersion: "1.0.1"

# How the DocumentDB extension reaches PostgreSQL pods. Decided once, when a
# DocumentDB cluster is created; existing clusters keep their mode.
Expand Down
4 changes: 2 additions & 2 deletions operator/src/internal/cnpg/testdata/golden/defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"name": "documentdb",
"image": {
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0"
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1"
},
"extension_control_path": [
"share"
Expand Down Expand Up @@ -114,7 +114,7 @@
"enabled": true,
"parameters": {
"documentDbCredentialSecret": "documentdb-credentials",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0"
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"documentDbCredentialSecret": "documentdb-credentials",
"gatewayCpuLimit": "1",
"gatewayCpuRequest": "1",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1",
"gatewayImagePullPolicy": "Never",
"gatewayMemoryLimit": "1536Mi",
"gatewayMemoryRequest": "1536Mi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"name": "documentdb",
"image": {
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0"
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1"
},
"extension_control_path": [
"share"
Expand Down Expand Up @@ -128,7 +128,7 @@
"documentDbCredentialSecret": "documentdb-credentials",
"gatewayCpuLimit": "500m",
"gatewayCpuRequest": "500m",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1",
"gatewayMemoryLimit": "1Gi",
"gatewayMemoryRequest": "1Gi",
"otelCollectorImage": "otel/opentelemetry-collector-contrib:0.149.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"name": "documentdb",
"image": {
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0"
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1"
},
"extension_control_path": [
"share"
Expand Down Expand Up @@ -112,7 +112,7 @@
"enabled": true,
"parameters": {
"documentDbCredentialSecret": "documentdb-credentials",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0"
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions operator/src/internal/cnpg/testdata/golden/recovery-pv.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"name": "documentdb",
"image": {
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0"
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1"
},
"extension_control_path": [
"share"
Expand Down Expand Up @@ -116,7 +116,7 @@
"enabled": true,
"parameters": {
"documentDbCredentialSecret": "documentdb-credentials",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0"
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{
"name": "documentdb",
"image": {
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.0"
"reference": "ghcr.io/documentdb/documentdb-kubernetes-operator/documentdb:1.0.1"
},
"extension_control_path": [
"share"
Expand Down Expand Up @@ -114,7 +114,7 @@
"enabled": true,
"parameters": {
"documentDbCredentialSecret": "documentdb-credentials",
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.0"
"gatewayImage": "ghcr.io/documentdb/documentdb-kubernetes-operator/gateway:1.0.1"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion operator/src/internal/utils/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const (

// DEFAULT_DOCUMENTDB_TAG is the default tag for the extension and gateway
// images when neither an explicit image nor a version is supplied.
DEFAULT_DOCUMENTDB_TAG = "1.0.0"
DEFAULT_DOCUMENTDB_TAG = "1.0.1"

// DEFAULT_DOCUMENTDB_IMAGE is the extension image used in ImageVolume mode.
DEFAULT_DOCUMENTDB_IMAGE = DOCUMENTDB_EXTENSION_IMAGE_REPO + ":" + DEFAULT_DOCUMENTDB_TAG
Expand Down
Loading