Repository navigation
feat: Add Arc + Fleet hybrid setup for DocumentDB portal visibility - #267
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces initial scaffolding for deploying the DocumentDB Kubernetes Operator via Azure AKS/Arc Extensions, including a draft extension manifest, Arc-specific Helm values, local testing script, and supporting documentation/design plan.
Changes:
- Added Azure Arc extension manifest (
extension.yaml) and Arc override values (values-arc.yaml) for Helm-based deployment. - Added a Kind-based local test script to simulate Arc extension install flows.
- Added extension README plus a detailed Azure Arc integration design/rollout plan.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| operator/arc-extension/values-arc.yaml | Adds Arc-oriented Helm values overrides for extension deployments |
| operator/arc-extension/test-arc-extension.sh | Adds local Kind + Arc testing harness for installation/verification/cleanup |
| operator/arc-extension/extension.yaml | Adds draft Azure extension manifest and release train definitions |
| operator/arc-extension/README.md | Adds end-user installation/configuration/troubleshooting guide |
| docs/designs/azure-arc/azure-arc-integration-plan.md | Adds detailed two-phase Arc integration + billing plan |
Signed-off-by: Rayhan Hossain <[email protected]>
Signed-off-by: Rayhan Hossain <[email protected]>
Signed-off-by: Rayhan Hossain <[email protected]>
0f16bd3 to
0d834ed
Compare
Signed-off-by: Rayhan Hossain <[email protected]>
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (playground, docs); effort from diff stats (2695+0 LOC, 11 files); LLM: Adds a new hybrid Arc + Fleet deployment guide and scripts to the playground component, enabling Azure Portal visibility for DocumentDB across hybrid environments without requiring full Arc extension integration. If a label is wrong, remove it manually and ping |
|
The POC is completed. Don't want to merge it in our public repo yet. Keeping as a draft PR. |
Signed-off-by: Rayhan Hossain <[email protected]>
|
|
||
| ### Phase 5: Install cert-manager on Kind (WSL) | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
kind is an arc pack - can we sue that instead?
Signed-off-by: Rayhan Hossain <[email protected]>
e0ea6ea to
8abb4a3
Compare
xgerman
left a comment
There was a problem hiding this comment.
Reviewed the Arc + Fleet hybrid playground. Nice defensive pattern on the Arc cert-manager path (prefer microsoft.certmanagement extension, fall back to upstream manifest, wait for readiness). A few items below — one functional bug in the inline DocumentDB manifest, a cert-manager version/source consistency note, a missing precheck, and a docs gap for the cert-manager Arc pack in the manual flow.
| spec: | ||
| instances: 3 | ||
| documentdbVersion: "8" | ||
| storage: | ||
| size: 10Gi |
There was a problem hiding this comment.
🔴 This inline DocumentDB manifest uses a stale schema and will be rejected by the current CRD.
spec.instancesdoesn't exist — the CRD requiresnodeCountandinstancesPerNode(both required).documentdbVersionis mis-cased (documentDBVersion) and"8"isn't a valid value — it expects a semver like"0.110.0"(or omit it to use the operator default).spec.storage.sizedoesn't exist — it'sspec.resource.storage.pvcSize.
Interestingly this PR's own documentdb-instance.yaml already uses the correct shape; this heredoc just wasn't updated to match. Suggested:
| spec: | |
| instances: 3 | |
| documentdbVersion: "8" | |
| storage: | |
| size: 10Gi | |
| spec: | |
| nodeCount: 1 | |
| instancesPerNode: 3 | |
| documentDbCredentialSecret: documentdb-credentials | |
| resource: | |
| storage: | |
| pvcSize: 10Gi |
(adjust the credential secret / topology to taste — the key point is it must validate against the current CRD).
| --wait --timeout 5m | ||
| else | ||
| log "Installing DocumentDB operator on $MEMBER..." | ||
| helm install documentdb-operator oci://ghcr.io/documentdb/documentdb-helm-chart \ |
There was a problem hiding this comment.
🟡 The operator Helm chart depends on cert-manager CRDs, but this script assumes cert-manager is already present (installed by setup-fleet-hub.sh / setup-arc-member.sh). Run standalone or out of order, this helm install ... --wait can hang or fail with confusing errors. A quick precheck (e.g. kubectl get deploy -n cert-manager cert-manager >/dev/null 2>&1 || warn/exit) would fail fast with a clear message.
| --release-train stable \ | ||
| --auto-upgrade-minor-version true \ |
There was a problem hiding this comment.
🟡 cert-manager version/source drift across the fleet. The Arc member installs via the microsoft.certmanagement extension on the stable release-train with --auto-upgrade-minor-version true, while the AKS hub (setup-fleet-hub.sh) pins the upstream manifest v1.17.2. So members can end up on different cert-manager versions, and both trail the version this repo documents as tested (AGENTS.md compatibility matrix: cert-manager 1.19.2). For a demo this is tolerable, but consider aligning the pinned manifest version across hub + member (and bumping toward 1.19.x), and noting that the Arc-extension path floats independently.
|
|
||
| ### Phase 5: Install cert-manager on Kind (WSL) | ||
|
|
||
| If you used the manual steps in Phase 4, install cert-manager explicitly: |
There was a problem hiding this comment.
📝 Docs gap: the manual flow only documents installing cert-manager from the upstream manifest, but the helper scripts prefer the Azure Arc cert-manager pack (microsoft.certmanagement). Please add the manual Arc-pack instructions here (and/or a short subsection under Phase 4/5) so users following the manual path can use the extension too — e.g.:
# Preferred: install cert-manager via the Azure Arc extension (the "cert-manager pack")
az k8s-extension create \
--name cert-manager \
--extension-type microsoft.certmanagement \
--scope cluster \
--cluster-type connectedClusters \
--cluster-name "$ARC_CLUSTER" \
--resource-group "$RESOURCE_GROUP" \
--release-train stable \
--auto-upgrade-minor-version true
# Verify the extension type is offered for this connected cluster first:
az k8s-extension extension-types list-by-cluster \
--cluster-type connectedClusters --cluster-name "$ARC_CLUSTER" \
--resource-group "$RESOURCE_GROUP" --query "[].extensionType" -o tsvWorth calling out explicitly: (a) it's Arc-member-only (the AKS hub still uses the upstream manifest), (b) the fallback to the upstream manifest when the extension type isn't offered, and (c) the known Helm-ownership conflict if cert-manager was already installed from raw manifests (already in the troubleshooting table — link to it here).
Signed-off-by: Rayhan Hossain <[email protected]>
| --wait --timeout 5m | ||
| else | ||
| log "Installing DocumentDB operator on $MEMBER..." | ||
| helm install documentdb-operator oci://ghcr.io/documentdb/documentdb-helm-chart \ |
There was a problem hiding this comment.
I needed to do s/documentdb-helm-chart/documentdb-operator to get this working
Signed-off-by: Rayhan Hossain <[email protected]>
Summary
Adds a new deployment guide for setting up DocumentDB across hybrid environments (AKS + on-premises) using Azure Fleet Manager. This enables Azure Portal visibility for all DocumentDB installations without requiring Azure extension registration.
Motivation
Customers need to track DocumentDB Kubernetes operator installations across diverse environments (cloud and on-prem) for billing and management purposes. This solution provides immediate portal visibility while the full Azure Arc extension integration is being developed.
What's Included
New:
documentdb-playground/arc-hybrid-setup-with-fleet/Architecture
Key Features
Testing
Manually validated end-to-end: